LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
I just tried to implement an algorithm based on the new QCAlgorithmFramework.
The exception: "These models are currently unsuitable for Cash Modeled brokerages" informed me that I cannot use it yet for my cash account.
Is support for cash accounts coming in the next few weeks? I'm asking, because I need to decide whether I want to wait or implement my idea "the old way".
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.
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.
Thanks Fabian! I recommend for crypto for now you write custom models or use the old system. We had to disable crypto as it was nearly impossible to automatically execute with the current accounting system we're using. No traditional brokerages use cash-settled-fx so its been a bit of a learning curve for us.
We're doing some research into how we can model and account for crypto portfolios in a way which meshes with the existing portfolio systems of LEAN. This is a "hard problem" which we can't rush and will take more than a few weeks.
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.
Hi Jake, cash accounts work fine just not crypto which doesnt follow same portfolio modeling patterns.
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.
Is there something I need to code for in my scripts? I'm getting this error when the only security I've specified is "CRON".
Â
Successfully sent backtest request for 'Crawling Brown Zebra', (Compile Id: c5da803d81965a481889f452f46b2a3c-460f2daf1fe02f4f0a76a83c72905885)
164 | 23:46:49:
These models are currently unsuitable for Cash Modeled brokerages (e.g. GDAX) and may result in unexpected trades. To prevent possible user error we've restricted them to Margin trading. You can select margin account types with SetBrokerage( ... AccountType.Margin)
CRON isn't a currency supported by either GDAX or Bitfinex, which are our two data vendors for crypto. The error you are receiving, however, doesn't stem from using an unsupported symbol but rather that GDAX doesn't support margin trading, and so you need to specify AccountType.Cash in the SetBrokerageModel call in the Initialize method (you can see more information on this in this community forum post). Bitfinex, however, does support margin trading and so you can use this brokerage instead if you want to trade using margin.
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.
"These models are currently unsuitable for Cash Modeled brokerages (e.g. GDAX) and may result in unexpected trades. To prevent possible user error we've restricted them to Margin trading"
(opposite of what you said are the restrictions)
So I had to change it to the following in order to keep developing my algo:
Which is not my real account status. By setting it this way I'm able to view CRON (though it's the US market and not Canada. But I suppose my IB account can pass my Canadian market data to QC, no?). I don't quite understand the reason for the restriction on Cash trading however.
The restriction on Cash trading is done on our end, and only specifically for Framework Algorithms, which you can see here. Cash modeling poses several unique problems with respect to the algorithm framework. One constant issue is that our primary cash brokerage, GDAX, doesn't support the concept of virtual positions (this is GDAX specific since they don't support margin trading, but we've applied the restriction across all brokerages, including IB). Another issue is the very concept of a virtual position. In cash modeling, there are no virtual positions, just currencies. In this model, an issue is how do we phrase portfolio targets. For example, if I emit a target of 10 BTC/USD but don't own USD, what does that mean? I might have millions of dollars of LTC, but since I don't own any USD I won't be able to execute on BTC/USD. A smart algorithm might sell some LTC for BTC instead. At this point, we're getting into the nitty-gritty of an individual algorithm and how that algorithm might transition between various currencies. The framework absolutely supports these types of things, but it requires agreement between the portfolio construction model and the execution model as to exactly what a target is describing.
Cash Account support for Framework Algorithms is something we're looking into but we can't provide a timeline of when this might be implemented. In the meantime, you can mimic using a cash account in backtesting by setting security leverage to 1. This can be done by adding a line in the security initialization function in StandardAlgorithm.py
We don't support any equities in Canadian markets right now, i.e. CRON on the Toronto exchange, and so I can't tell you for certain whether or not IB would be able to accommodate this if you tried their ticker for CRON in Toronto (I think it would be CRON.TO or something similar).
0
Edited by Jack Simonson
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.
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...
To unlock posting to the community forums please complete at least 30% of Boot Camp. You can
continue your Boot Camp training progress from the
terminal. We hope to see you in the community soon!
You do not have enough QC Credit to send this award, get a QC Credit Pack
here.
Award Sent Successfully
Thank you for giving back to the community.
Processing...
Choose a Credit Pack
Payment Confirmation
QuantConnect Credit (QCC) can be applied to your cloud-invoices or
gifted to others in the community with Community Awards in recognition of their contributions.
Community Awards highlight the awesome work your fellow community members are doing and inspires
high quality algorithm contributions to the community. Select an option below to add
QuantConnect Credit to your account:
$5
500 Credit Points
 
$10
1,000 Credit Points
 
$18
2,000 Credit Points
10% bonus
$45
5,000 Credit Points
10% bonus
03/23XXXX XXXX XXXX 0592
We will charge your default organization credit card on file, click
here to update.