Back

Making a Specific Trade - Pythong

I am new to QuantConnect and am trying to build some basic back testing.  What I would like to do is test an algorithm that I have built outside of QuantConnect.  Basically, I am sending Candle sticks into my system and getting out a probability / trade outcome.  

This becomes a buy or a sell order. 

Is it possible to pass into the backtesting tool (in python) a specific trade?  i.e. 11/1/2017 - buy EURUSD at 1.3244? 

Ultimately, I would like to iterate over an array of buys and sells to see my accuracy of predictions, but if I can figure out how to make a specific trade (either long or short), that would be great. 

Update Backtest







Brian Wones , sorry about the wait. I don't think I follow your question.
Do you want to connect the algorithm you have built outside to Lean/QuantConnect?
I would advise you to read the docs first.

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'm not sure there's an nicer way to do it than the following:

  1. Pass a list of dates/times, directions and prices into your algorithm (from the other one), storing this somewhere so it can be accessed at every loop
  2. Inside the OnData loop, checking if the current date/time matches the list of dates/times
  3. If it matches, then execute the order as directed by the list
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