Back

New Algorithm Creator

Hey All!

We've created a new algorithm creation wizard for laying the groundwork for your algorithm. This wizard lets us pull in assorted modules and quickly assemble them into auto-coded scaffolding. 

We've added a dozen or so Alphas over the last 2 days and we'll keep adding more and more so you'll have an enormous pool of template code to work from to seed your ideas. You'll still need to code though as these modules will just lay a foundation by importing the data needed and creating alpha models.

Just click "Create New Algorithm" to test it out!

 

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.



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.


That's really cool! I keep getting this error through.

 

Runtime Error: AttributeError : 'Pandas' object has no attribute 'volume' AttributeError : 'Pandas' object has no attribute 'volume' (Open Stacktrace)

So far every combination I've tried has errored out. 

0

Send it through to support@quantconnect.com and we'll debug
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.


The wizzard is awesome! I'd suggest to add module templates, which creates files containing the basic code for each of the module types:  alpha template module, universe template module, etc.  

2

This. Is. LEGIT! Thank you so much!

1

Thank you guys!

0

I like to hand code, but this is cool and will teach me to code the correct way in QuantConnect.

Thanks mate, you are a legend.

0

Thanks but was team effort! All Gustavo, Halldor, Jave, & Jack =)
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 know i should know this but how do you chose Python code vs C#, Does the system only look at your profile

 

Thanks

0

Hi Frank,

You can quickly switch between Python and C# by clicking the C#/Py icon on the bottom-right of the IDE window. When you switch between the two, there is no need to reload the page and you can immediately build new algorithms!

68066_1555352961.jpg

 

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.


Thank you for your help



Sent from my Verizon Wireless 4G LTE DROID



QuantConnect Community wrote:
0

Very interesting! 

Would be extremly useful to add a framework reference library to the Editor,  

Rather than having to specify the specific components at the onset of algorithm creation, it would enable viewing the available Pallete of Alpha/Universe/Portfolio/Risk/Execution models to choose from.

All you really need(want) is enough to see what is available, the reference instantiation snippet (copy paste) and possibly and configuration documentation...  

Further would be nice if this included privately defined and licensed alphas...

0

Hi Jeffrey,

Thanks for your suggestions! We will definitely consider those cool ideas and add them to our roadmap.

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.


Great Work! Thx U guys!

0

Hello,

I am new to using LEAN. I built my first test usind "Algorithm Creator" to do the following: Implement and understand how RSI strategy works for "SPY". I used default plug and play components from "Algorithm Creator" and added a few graphs to undertsand how it works. (see attached backtest for code and graphs)

I am trying to figure out how to modify the code to undretsand the following things:

1. Why I see "SPY" baught and sold on the same day, in most of the trades.

2.Why I do not see any Insignts generated (I use Daily resolution to reduce backtest time).  

3. Why S&P500 Benchmark shown as a straight line ?

4. How to show indiators and buy/sell signals on "Strategy equity graph"? 

Any suggestions?

Thanks

Sachin

 

0


Hi Sachin,

1) The short answer is: the resolution is too low.
Here is the real answer: Since we are using daily resolution, the time of daily bar arrives is out of market hour. Therefore, every order is placed when the market is closed, and filled on the next day.

An example would be: On 2018-06-26, the closing price triggers risk management model and submitted an order to liquidate. However, that order is filled on 2018-06-27 with the new closing price on that day. And as it is filled, self.Portfolio.Invested becomes false again and another buy order is placed (and filled immediately). Moreover, although those two orders are filled, the portfolio values (unrealized profit, absolute holding cost) which are involved in the risk management calculation are not updated immediately. In fact, the new values will be effective when the next bar arrives (tomorrow). However, the closing price of 2018-06-27 still triggers risk management and another Liquidate() takes place. This is why you saw both buy and sell on 2018-06-27.

To avoid this: use minute resolution or higher. You would see what you expected: sell when risk management is triggered, and buy back when next bar arrives.

2) The reason is there was no insight triggered. I would recommand to  user higher resolution or reduce the period (currently 60). To reduce backtest running time, besides using low resolution, we could also set end date to use less data. For example:

self.SetEndDate(2018, 12, 1)

3) It is a legacy issue and we will fix it soon. Meanwhile, you could use 

self.SetBenchmark("SPY")

or select S&P500 benchmark by this:
74665_1559665002.jpg 

4) In order to plot the values, I attached the RsiAlphaModel below the original code, and added the plot statement in Update() method. "Strategy equity graph" is our default chart and it's better not to modify it. We could always create a new chart for our own use. Please check for the last session in initialize() for my implementation, and here is our documentation page regarding charting.

Hope it helps.

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.


Thanks Liang for the reply and suggestions. I will check it out. 

0

Remove me from newsletter please



niedz., 9 cze 2019, 14:09 użytkownik QuantConnect Community <

forum+5603.d9fd195d62c97881cacfaf56ac019e3e@quantconnect.com> napisał:
0

Hi Filip,

To manage your subscription, you could go to subscription page. Thanks for your support!

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.


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