Back

ETF trading strategy

Bump it up to 5.5 sharpe with 40% annual return. Assuming IB transaction costs and 15 cents slippage.
Update Backtest








Hey @Max - I've completed it and will push it to github now. We redeployed servers this morning.

This example below uses the data filter to only trade on Wednesdays :)

I built an [unfinished] more complex standard deviation filter in link above but it was too dangerous to make default. Stocks that were not liquid triggered the filter with legitimate data. Even premarket data on the SPY was so choppy it triggered the filter. So I'll release the tools to you now, and leave it up to you guys to build the right filter for this strategy. Here is the day from Ardar's snap shot above to get you started: 20140804_SPY.zip
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, Jared, as for filter : as I know usually it's used very simple one : if trade goes beyond the ask:bid range significally (let's say 2 x (ask-bid)) then it's just removed. But in this case you need to maintain quotes aswell.
0

Understood, sadly we don't have the quotes, but the provider does include a suspicious flag. We pass that through with the tick data, but it wasn't used in the second & minute bars.

We've started the process of regenerating the entire data set with this filter flag activated to remove bad ticks for second and minute bars, and if people want to use all of the raw ticks they can drop down to tick resolution and see the suspicious ones themselves. The re-processing is automated but will take at least 7-10 days I think. There's a lot of data to crunch. It might not remove everything either, so we'll leave the filter there as well for full control.
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.


@ Parvin
Hi Parvin, thank you for sharing this strategy.
I can't see where you calibrate the hawkes process in your code?
Could you please elaborate a bit on this.
regards
0

I think its valuies from bitcoin article (above), but actually those values don't matter much if beta is times less than betafactor. Calibrations usually work in backtests only, but not in the forward testing. Usually at least :D
1

As a side note. Understand the logics behind process. Simply said it acts on extreme spikes (i.e., errors, anomalies). Actually, a lot of sciences have anomaly detection techniques. For example, detecting marijuana in fields of crops using aerial photography. We can try any of methods in various different disciplines if you think about financial data as any other data. Problem with financials, they are not static as shapes of broken chains or crops.
1

Imo the data for the simulation has major flaws. I reimplemented the strategy using IB 1 second tick-data and had a completely different (much worse) result. 80 cent per share discrepancies (see image) in the same tick in thickly traded instruments like IWM are very very bad.
iwm
fotos hochladen

0

Thanks @Andreas, we diagnosed this on Aug 8th above -- the data is real, even much better than IB's feed (IB is a market maker) - it is just too real :) The trades are from high frequency, low volume flickers that some retail providers don't capture. We're doing some filtering on the data now and have built in a way for you to implement your own data filter - its part of the difficulty of working with tick data unfortunately. If you're curious can purchase 1-symbol-year directly from QuantQuote to see the raw ticks
1

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.


Haha, I'm so slow, I've just read QuantQuote data sample. Questions regarding this. Is there a possibility on script to call exchange name and trade size? Are there quote ticks available or just trade ticks?
0

Hey Tadas - absolutely, it is in the "Quantity" and "Exchange" properties of tick data, (here on Github). Exchange is a short code expanded here.

We don't have the quote data but QuantQuote offers that as well. I'd like to offer it, but its more expensive than trade-only and 90% of users are using second data maximum. One thing to consider if trading through QC is the live data streams are broker provided so often aren't as good as our historical source (e.g. IB is updated every 300ms). Tradier datafeed is built from trade-streams just like our backtests.
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.


Hey Satyapravin Bezwada,

First of, thank you for sharing the strategy with such great performance. My back tests of this strategy against other data providers such as IB and IQFeed did not show such good results. The reason was the data of other data providers is different seriously affecting the performance. Although I tried to adjust the strategy parameters still the performance at QuantConnect is much better. Did you test your strategy against other data providers and whet performance did you get there?
0

Sergey, all, we identified performance due to spikes in market price causes by high frequency trades or exchanges not covered by retail data feeds. The spikes often lasted just for 1 tick, skewing the second bar's value. These were real market prices and also came through the live feeds on eSignal etc. Some providers filter this data after market close, and store different data to eliminate such spikes. We also found similar spikes/bars on other data providers (ardar's screen shot comment above).

It is unlikely a retail user could execute a trade on this flux given its brevity. So the likelihood of this strategy performing well in real trading is very slim. To save repeating same questions, and anyone risking real cash with this strategy I'll lock this thread --

If doing intra-minute trading I'd still recommend using a 2-3 sec rolling filter, or use tick data and scan the volume and exchange of the trades. (See comment on tick Exchange & Quantity properties above).

We're exploring the best way to make this more user friendly. Our data is more realistic than any retail source; but at the same time if you can't execute on those prices its not helpful for backtesting. Next week after live trading is humming we are scheduled to review the best way to address this. Potentially we'll build out the default filters or use a liquid subset of the markets (NYSE, NASDAQ, BATS). I'll update this thread once we do.

Best,
Jared
2

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.


What would the result be if we increase the commission to 0.2% (in percentage of capital traded instead of in absolute figure like $1) and increase the slippage to 0.8% spread between the bid-ask?
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