Lean  $LEAN_TAG$
QuantConnect.Securities.Index.IndexHolding Class Reference

Index holdings implementation of the base securities class More...

Inheritance diagram for QuantConnect.Securities.Index.IndexHolding:
[legend]

Public Member Functions

 IndexHolding (Index security, ICurrencyConverter currencyConverter)
 INDEX Holding Class constructor More...
 
- Public Member Functions inherited from QuantConnect.Securities.SecurityHolding
 SecurityHolding (Security security, ICurrencyConverter currencyConverter)
 Create a new holding class instance setting the initial properties to $0. More...
 
void AddNewFee (decimal newFee)
 Adds a fee to the running total of total fees in units of the account's currency. More...
 
void AddNewProfit (decimal profitLoss)
 Adds a profit record to the running total of profit in units of the account's currency. More...
 
void AddNewSale (decimal saleValue)
 Adds a new sale value to the running total trading volume in units of the account's currency. More...
 
void AddNewDividend (decimal dividend)
 Adds a new dividend payment to the running total dividend in units of the account's currency. More...
 
void SetLastTradeProfit (decimal lastTradeProfit)
 Set the last trade profit for this security from a Portfolio.ProcessFill call in units of the account's currency. More...
 
virtual void SetHoldings (decimal averagePrice, int quantity)
 Set the quantity of holdings and their average price after processing a portfolio fill. More...
 
virtual void SetHoldings (decimal averagePrice, decimal quantity)
 Set the quantity of holdings and their average price after processing a portfolio fill. More...
 
virtual void UpdateMarketPrice (decimal closingPrice)
 Update local copy of closing price value. More...
 
virtual ConvertibleCashAmount GetQuantityValue (decimal quantity)
 Gets the total value of the specified quantity of shares of this security in the account currency More...
 
virtual ConvertibleCashAmount GetQuantityValue (decimal quantity, decimal price)
 Gets the total value of the specified quantity of shares of this security in the account currency More...
 
virtual decimal TotalCloseProfit (bool includeFees=true, decimal? exitPrice=null, decimal? entryPrice=null, decimal? quantity=null)
 Profit if we closed the holdings right now including the approximate fees in units of the account's currency. More...
 
override string ToString ()
 Writes out the properties of this instance to string More...
 

Additional Inherited Members

- Public Attributes inherited from QuantConnect.Securities.SecurityHolding
virtual bool HoldStock => _invested
 Boolean flag indicating if we hold any of the security More...
 
virtual bool Invested => _invested
 Boolean flag indicating if we hold any of the security More...
 
- Protected Member Functions inherited from QuantConnect.Securities.SecurityHolding
 SecurityHolding (SecurityHolding holding)
 Create a new holding class instance copying the initial properties More...
 
virtual void OnQuantityChanged (decimal previousAveragePrice, decimal previousQuantity)
 Event invocator for the QuantityChanged event More...
 
- Properties inherited from QuantConnect.Securities.SecurityHolding
Security Security [get]
 The security being held More...
 
IPortfolioTarget Target [get, set]
 Gets the current target holdings for this security More...
 
decimal AveragePrice [get, protected set]
 Average price of the security holdings. More...
 
decimal Quantity [get, protected set]
 Quantity of the security held. More...
 
Symbol Symbol [get]
 Symbol identifier of the underlying security. More...
 
SecurityType Type [get]
 The security type of the symbol More...
 
virtual decimal Leverage [get]
 Leverage of the underlying security. More...
 
virtual decimal HoldingsCost [get]
 Acquisition cost of the security total holdings in units of the account's currency. More...
 
virtual decimal UnleveredHoldingsCost [get]
 Unlevered Acquisition cost of the security total holdings in units of the account's currency. More...
 
virtual decimal Price [get, protected set]
 Current market price of the security. More...
 
virtual decimal AbsoluteHoldingsCost [get]
 Absolute holdings cost for current holdings in units of the account's currency. More...
 
virtual decimal UnleveredAbsoluteHoldingsCost [get]
 Unlevered absolute acquisition cost of the security total holdings in units of the account's currency. More...
 
virtual decimal HoldingsValue [get]
 Market value of our holdings in units of the account's currency. More...
 
virtual decimal AbsoluteHoldingsValue [get]
 Absolute of the market value of our holdings in units of the account's currency. More...
 
virtual decimal TotalSaleVolume [get]
 The total transaction volume for this security since the algorithm started in units of the account's currency. More...
 
virtual decimal TotalFees [get]
 Total fees for this company since the algorithm started in units of the account's currency. More...
 
virtual decimal TotalDividends [get]
 Total dividends for this company since the algorithm started in units of the account's currency. More...
 
virtual bool IsLong [get]
 Boolean flag indicating we have a net positive holding of the security. More...
 
virtual bool IsShort [get]
 BBoolean flag indicating we have a net negative holding of the security. More...
 
virtual decimal AbsoluteQuantity [get]
 Absolute quantity of holdings of this security More...
 
virtual decimal LastTradeProfit [get]
 Record of the closing profit from the last trade conducted in units of the account's currency. More...
 
virtual decimal Profit [get]
 Calculate the total profit for this security in units of the account's currency. More...
 
virtual decimal NetProfit [get]
 Return the net for this company measured by the profit less fees in units of the account's currency. More...
 
virtual decimal UnrealizedProfitPercent [get]
 Gets the unrealized profit as a percentage of holdings cost More...
 
virtual decimal UnrealizedProfit [get]
 Unrealized profit of this security when absolute quantity held is more than zero in units of the account's currency. More...
 
- Events inherited from QuantConnect.Securities.SecurityHolding
EventHandler< SecurityHoldingQuantityChangedEventArgsQuantityChanged
 Event raised each time the holdings quantity is changed. More...
 

Detailed Description

Index holdings implementation of the base securities class

See also
SecurityHolding

Definition at line 22 of file IndexHolding.cs.

Constructor & Destructor Documentation

◆ IndexHolding()

QuantConnect.Securities.Index.IndexHolding.IndexHolding ( Index  security,
ICurrencyConverter  currencyConverter 
)

INDEX Holding Class constructor

Parameters
securityThe INDEX security being held
currencyConverterA currency converter instance

Definition at line 29 of file IndexHolding.cs.


The documentation for this class was generated from the following file: