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, ICustomTypeDescriptor
- Inheritance
-
HedgeStrategy
- Implements
- Derived
- Inherited Members
- Extension Methods
-
MarketRuleHelper.WhenPartiallyFinishedCandles<TCandle>(ISubscriptionProvider, Subscription, decimal)
Constructors
HedgeStrategy(BasketBlackScholes)
Initialize HedgeStrategy.
protected HedgeStrategy(BasketBlackScholes blackScholes)
Parameters
blackScholesBasketBlackScholes
Properties
BlackScholes
Portfolio model for calculating the values of Greeks by the Black-Scholes formula.
protected BasketBlackScholes BlackScholes { get; }
Property Value
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
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
Methods
AddReHedgeOrder(Strategy, Order)
To add the rehedging order.
protected virtual void AddReHedgeOrder(Strategy parentStrategy, Order order)
Parameters
parentStrategyStrategyThe parent strategy (by the strike or the underlying asset).
orderOrderThe rehedging order.
AddReHedgeQuoting(Strategy, Order)
To add the rehedging strategy.
protected virtual void AddReHedgeQuoting(Strategy parentStrategy, Order order)
Parameters
parentStrategyStrategyThe parent strategy (by the strike or the underlying asset).
orderOrderThe rehedging order.
CreateQuoting(Order)
To create a quoting strategy to change the position.
protected virtual QuotingStrategy CreateQuoting(Order order)
Parameters
orderOrderQuoting 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
currentTimeDateTimeOffsetCurrent time.
Returns
- IEnumerable<Order>
Rehedging orders.
IsSuspended()
Whether the rehedging is paused.
protected virtual bool IsSuspended()
Returns
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
timeDateTimeOffset
ReHedge(IEnumerable<Order>)
To start rehedging.
protected virtual void ReHedge(IEnumerable<Order> orders)
Parameters
ordersIEnumerable<Order>Rehedging orders.