Interface IAccount
Trading calendar class to convert a date range to an enumerable of valid trading days.
Namespace: TuringTrader.SimulatorV2
Assembly: TuringTrader.Simulator.dll
Syntax
public interface IAccount
Properties
| Improve this Doc View SourceCash
Return of cash available, as fraction of NAV.
Declaration
double Cash { get; }
Property Value
Type | Description |
---|---|
double |
NetAssetValue
Return net asset value in currency, starting with $1,000 at the beginning of the simulation. Note that currency has no relevance throughout the v2 engine. We use this value to make the NAV more tangible during analysis and debugging.
Declaration
double NetAssetValue { get; }
Property Value
Type | Description |
---|---|
double |
Positions
Return positions, as fraction of NAV.
Declaration
Dictionary<string, double> Positions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TKey, TValue><string, double> |
TradeLog
Retrieve trade log. Note that this log only contains trades executed and not orders that were not executed.
Declaration
List<IAccount.OrderReceipt> TradeLog { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><IAccount.OrderReceipt> |
Methods
| Improve this Doc View SourceProcessBar()
Process bar. This method will loop through the queued orders, execute them as required, and return a bar representing the strategy's NAV.
Declaration
OHLCV ProcessBar()
Returns
Type | Description |
---|---|
OHLCV |
SubmitOrder(string, double, OrderType, double)
Submit and queue order.
Declaration
void SubmitOrder(string Name, double weight, OrderType orderType, double orderPrice = 0)
Parameters
Type | Name | Description |
---|---|---|
string | Name | asset name |
double | weight | asset target allocation |
OrderType | orderType | order type |
double | orderPrice | trigger price for stop and limit orders |