Back

[Update] New Cashbook

We've pushed a few significant updates to the open source project which will soon be incorporated into QuantConnect. The biggest of these is accurate FOREX modelling by keeping a running FOREX cashbook. This lays the ground work for treating FOREX transactions as currency swaps which and will use a margin requirement system instead of the cash modelling. Keep watch in the coming days for changes in your FOREX algorithms as they'll soon use true quantities and maintain a base currency total balance in USD!

If you're interested in the mechanics; check out the new CashBook property in the open source project!
Update Backtest






The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.



Hi Community

Is there a way to set your algo's base currency in Live Trading? It seems that the FOREX portion of my portfolio is being counted as a separate thing and when my self.setHoldings("Ticker", 0.95) action is executed, it doesn't actually purchase 95% of my portfolio value, even though I only have USD in the account. 

I believe Quantconnect has been keeping a constant balance of my USD.CAD notional instead of just having USD as the base currency in my account.

Please let me know if this wasn't too clear and thanks for your help!

Cheers,
Fang

0

Please attach an example if seeking assistance. So people can help.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


I've attached my current live trading algorithm holdings screenshots here:

You can see that USDCAD is counted as it's own holding and has an associated market value which is causing my total portfolio market value to be over-reported:

I'm not sure how I would specify my algorithm to have it acknowledge the account as USD base. I've also included my algorithm code for reference.

Cheers,
Fang

0

Hey Fang, That looks fine to me -- currency is modelled as a cash swap; Your equity is $11,198 and holdings are higher as its a swap. If there's some specific issue with your live algorithm send a support ticket through the IDE with your project attached so we can pull up the logs.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Never mind

0

Amazing, I replied to two year old thread without realizing :D

1

Gotcha, thanks Jared!

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed