Lean
$LEAN_TAG$
|
Provides an implementation of ICurrencyConversion to find and use multi-leg currency conversions More...
Public Member Functions | |
void | Update () |
Signals an updates to the internal conversion rate based on the latest data. It will set the conversion rate as potentially outdated so it gets re-calculated. More... | |
Static Public Member Functions | |
static SecurityCurrencyConversion | LinearSearch (string sourceCurrency, string destinationCurrency, IList< Security > existingSecurities, IEnumerable< Symbol > potentialSymbols, Func< Symbol, Security > makeNewSecurity) |
Finds a conversion between two currencies by looking through all available 1 and 2-leg options More... | |
Public Attributes | |
IEnumerable< Security > | ConversionRateSecurities => _steps.Select(step => step.RateSecurity) |
The securities which the conversion rate is based on More... | |
Properties | |
string | SourceCurrency [get] |
The currency this conversion converts from More... | |
string | DestinationCurrency [get] |
The currency this conversion converts to More... | |
decimal?? | ConversionRate [get, set] |
The current conversion rate More... | |
Properties inherited from QuantConnect.Securities.CurrencyConversion.ICurrencyConversion | |
string | SourceCurrency [get] |
The currency this conversion converts from More... | |
string | DestinationCurrency [get] |
The currency this conversion converts to More... | |
decimal | ConversionRate [get, set] |
The current conversion rate between SourceCurrency and DestinationCurrency More... | |
IEnumerable< Security > | ConversionRateSecurities [get] |
The securities which the conversion rate is based on More... | |
Events | |
EventHandler< decimal > | ConversionRateUpdated |
Event fired when the conversion rate is updated More... | |
Events inherited from QuantConnect.Securities.CurrencyConversion.ICurrencyConversion | |
EventHandler< decimal > | ConversionRateUpdated |
Event fired when the conversion rate is updated More... | |
Provides an implementation of ICurrencyConversion to find and use multi-leg currency conversions
Definition at line 28 of file SecurityCurrencyConversion.cs.
void QuantConnect.Securities.CurrencyConversion.SecurityCurrencyConversion.Update | ( | ) |
Signals an updates to the internal conversion rate based on the latest data. It will set the conversion rate as potentially outdated so it gets re-calculated.
Implements QuantConnect.Securities.CurrencyConversion.ICurrencyConversion.
Definition at line 158 of file SecurityCurrencyConversion.cs.
|
static |
Finds a conversion between two currencies by looking through all available 1 and 2-leg options
sourceCurrency | The currency to convert from |
destinationCurrency | The currency to convert to |
existingSecurities | The securities which are already added to the algorithm |
potentialSymbols | The symbols to consider, may overlap with existingSecurities |
makeNewSecurity | The function to call when a symbol becomes part of the conversion, must return the security that will provide price data about the symbol |
ArgumentException | Thrown when no conversion from sourceCurrency to destinationCurrency can be found |
Definition at line 173 of file SecurityCurrencyConversion.cs.
IEnumerable<Security> QuantConnect.Securities.CurrencyConversion.SecurityCurrencyConversion.ConversionRateSecurities => _steps.Select(step => step.RateSecurity) |
The securities which the conversion rate is based on
Definition at line 137 of file SecurityCurrencyConversion.cs.
|
get |
The currency this conversion converts from
Definition at line 70 of file SecurityCurrencyConversion.cs.
|
get |
The currency this conversion converts to
Definition at line 75 of file SecurityCurrencyConversion.cs.
|
getset |
The current conversion rate
Definition at line 81 of file SecurityCurrencyConversion.cs.
EventHandler<decimal> QuantConnect.Securities.CurrencyConversion.SecurityCurrencyConversion.ConversionRateUpdated |
Event fired when the conversion rate is updated
Definition at line 65 of file SecurityCurrencyConversion.cs.