SmartQuant Discussion http://www.smartquant.com/forums/ |
|
Multiple currency portfolio support? http://www.smartquant.com/forums/viewtopic.php?f=42&t=14868 |
Page 1 of 1 |
Author: | ericwang [ Mon Nov 12, 2018 6:32 am ] | ||
Post subject: | Multiple currency portfolio support? | ||
Hi, I have a strategy trading multiple instruments with different base currencies. I would like to deposit money before paper trading. However, the result of following codes: Code: protected override void OnStrategyStart() { if (StrategyManager.Mode == StrategyMode.Paper) { Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.USD, "Initial allocation"); Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.CNY, "Initial allocation"); Portfolio.Account.Deposit(Clock.DateTime, AllocationPerInstrument, CurrencyId.CNH, "Initial allocation"); } I got 3x USD money in my portfolio and USD only.
|
Author: | skuvv [ Mon Nov 12, 2018 9:26 am ] |
Post subject: | Re: Multiple currency portfolio support? |
Hello. 1)Do you use CurrencyConverter? 2)I suppose that you prepared all instruments for working with currencies. 3)I think that at moment OnStrategyStart(), framework not have the necessary data for currency conversion. For test this suggestion you can programmatically send quotes to framework or wait market data. And next, check the portfolios. |
Author: | ericwang [ Mon Nov 12, 2018 12:38 pm ] |
Post subject: | Re: Multiple currency portfolio support? |
Thank you for your reply. skuvv wrote: Hello.
1)Do you use CurrencyConverter? 2)I suppose that you prepared all instruments for working with currencies. 3)I think that at moment OnStrategyStart(), framework not have the necessary data for currency conversion. For test this suggestion you can programmatically send quotes to framework or wait market data. And next, check the portfolios. |
Page 1 of 1 | All times are UTC + 3 hours |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |