Table of Contents

Class HedgeStrategy

Namespace
StockSharp.Algo.Strategies.Derivatives
Assembly
StockSharp.Algo.dll

The base strategy of hedging.

public abstract class HedgeStrategy : Strategy, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IMarketRuleContainer, ILogReceiver, ILogSource, IDisposable, ICloneable<Strategy>, ICloneable, IMarketDataProvider, ISubscriptionProvider, ISecurityProvider, ISecurityMessageProvider, ITransactionProvider, IPositionProvider, IPortfolioProvider, IScheduledTask
Inheritance
HedgeStrategy
Implements
IPersistable
INotifyPropertyChangedEx
ICloneable<Strategy>
Derived
Inherited Members
Extension Methods

Constructors

HedgeStrategy(BasketBlackScholes)

Initialize HedgeStrategy.

protected HedgeStrategy(BasketBlackScholes blackScholes)

Parameters

blackScholes BasketBlackScholes

BasketBlackScholes.

Properties

BlackScholes

Portfolio model for calculating the values of Greeks by the Black-Scholes formula.

protected BasketBlackScholes BlackScholes { get; }

Property Value

BasketBlackScholes

PriceOffset

The price shift for the registering order. It determines the amount of shift from the best quote (for the buy it is added to the price, for the sell it is subtracted).

[Display(ResourceType = typeof(LocalizedStrings), Name = "PriceOffset", Description = "PriceOffsetForOrder", GroupName = "Hedging", Order = 1)]
public Unit PriceOffset { get; set; }

Property Value

Unit

UseQuoting

Whether to quote the registered order by the market price. The default mode is disabled.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Quoting", Description = "UseQuotingDesc", GroupName = "Hedging", Order = 0)]
public bool UseQuoting { get; set; }

Property Value

bool

Methods

AddReHedgeOrder(Strategy, Order)

To add the rehedging order.

protected virtual void AddReHedgeOrder(Strategy parentStrategy, Order order)

Parameters

parentStrategy Strategy

The parent strategy (by the strike or the underlying asset).

order Order

The rehedging order.

AddReHedgeQuoting(Strategy, Order)

To add the rehedging strategy.

protected virtual void AddReHedgeQuoting(Strategy parentStrategy, Order order)

Parameters

parentStrategy Strategy

The parent strategy (by the strike or the underlying asset).

order Order

The rehedging order.

CreateQuoting(Order)

To create a quoting strategy to change the position.

protected virtual QuotingStrategy CreateQuoting(Order order)

Parameters

order Order

Quoting order.

Returns

QuotingStrategy

The strategy of quoting.

GetNotificationRules()

To get a list of rules on which the rehedging will respond.

protected virtual IEnumerable<IMarketRule> GetNotificationRules()

Returns

IEnumerable<IMarketRule>

Rule list.

GetReHedgeOrders(DateTimeOffset)

To get a list of orders rehedging the option position.

protected abstract IEnumerable<Order> GetReHedgeOrders(DateTimeOffset currentTime)

Parameters

currentTime DateTimeOffset

Current time.

Returns

IEnumerable<Order>

Rehedging orders.

IsSuspended()

Whether the rehedging is paused.

protected virtual bool IsSuspended()

Returns

bool

true if paused, otherwise, false.

OnStarted(DateTimeOffset)

The method is called when the Start() method has been called and the ProcessState state has been taken the Started value.

protected override void OnStarted(DateTimeOffset time)

Parameters

time DateTimeOffset

ReHedge(IEnumerable<Order>)

To start rehedging.

protected virtual void ReHedge(IEnumerable<Order> orders)

Parameters

orders IEnumerable<Order>

Rehedging orders.