Hello-
I wanted to post findings from a price study I performed after detecting large price differences between Etrade/Yahoo and QC while performing QA on my Algo.
I'm hoping QC can comment on these price differences as it makes QA testing and developing strategies difficult when price data is in question. I also understand price data pipelines will have variation so perhaps QC can share price data specifications, data, or a white paper on how price data differs from reference/benchmark data like Yahoo or Etrade.
Setup
- Two tickers (ADT & ACRS) were selected
- Three random consecutive days were selected
- Etrade & Yahoo were used as a price benchmark
- From QuantConnect, OnData Minute and Daily prices were gathered
- Price High and Low were measured for each day for all data sources and tickers
Attached is the backtest I used, simply switching between resolutions (Daily, Minute) and tickers (ADT, ACRS).
Main Findings
- In price study 1 I found consistent low price error compared to the benchmarks
- In price study 2 I found a surprising difference between QC methods; Daily data had significant error compared to Minute data for ACRS on 5/18/2023.
Mia Alissi
Based on the information provided in the extracts, it's not possible to review 'Justin's' Python code for bugs as the code provided is incomplete. The
OnData
method in theGeekyAsparagusKangaroo
class is empty and the research notebook code does not seem to be related to the issue 'Justin' is facing.Regarding the price differences 'Justin' is observing between Etrade/Yahoo and QuantConnect, it's important to note that data can vary between different providers. As mentioned in one of the extracts, QuantConnect's data is real and often more accurate than some retail providers. It captures high frequency, low volume flickers that some retail providers don't capture.
However, if 'Justin' is observing significant discrepancies, it might be worth investigating further. Unfortunately, without more specific information or examples, it's difficult to provide a more detailed answer.
'Justin' might find it helpful to refer to the QuantConnect documentation or post a detailed question on the QuantConnect forum for further assistance.
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.
Justin E
To narrow in on a specific finding, the Log output of the backtest I attached in the first post shows a daily price of $8.54 on 5/18/2023 for ACRS. The attached backtest plots ACRS with minute resolution on 5/18/2023 with a price of $8.33 (near the price of data benchmarks).
How do you explain why QC gives two large price differences for the same ticker on the same day?
Mia Alissi
Based on the information provided in the extracts, it's important to note that different data sources can have different close prices, which can impact the final results of a backtest. This is due to the fact that each data source may capture different aspects of the market. For example, some data sources may capture high frequency, low volume flickers that some retail providers don't capture. This can lead to differences in the reported prices for the same asset at the same time.
In the case of QuantConnect, the data used is real and often more accurate than some retail providers. However, it's also possible that the data from Etrade/Yahoo is being filtered or adjusted in some way that QuantConnect's data is not, leading to the discrepancies you're observing.
If you're observing significant discrepancies, it might be worth running a backtest on QuantConnect and comparing the result of
self.History
with the same data from another source. This can help you understand where the differences are coming from.Regarding the Python code you provided, it's not possible to identify any bugs related to the price differences you're observing without more specific information or examples. The code seems to be a simple algorithm that plots the price of a given security, and there's no obvious reason why it would report different prices for the same asset at the same time.
If you continue to observe significant price discrepancies, I would recommend posting a detailed question on the QuantConnect forum with specific examples. The community there may be able to provide further insights.
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.
Justin E
Thanks Mia.
Louis Szeto , Nico Xenox , Alexandre Catarino could use your help on this one.
Mia Alissi
Based on the information provided in the extracts, it's important to note that different data sources can have different close prices, which can impact the final results of a backtest. This is due to the fact that each data source may capture different aspects of the market. For example, some data sources may capture high frequency, low volume flickers that some retail providers don't capture. This can lead to differences in the reported prices for the same asset at the same time.
In the case of QuantConnect, the data used is real and often more accurate than some retail providers. However, it's also possible that the data from Etrade/Yahoo is being filtered or adjusted in some way that QuantConnect's data is not, leading to the discrepancies you're observing.
If you're observing significant discrepancies, it might be worth running a backtest on QuantConnect and comparing the result of
self.History
with the same data from another source. This can help you understand where the differences are coming from.Regarding the Python code you provided, it's not possible to identify any bugs related to the price differences you're observing without more specific information or examples. The code seems to be a simple algorithm that plots the price of a given security, and there's no obvious reason why it would report different prices for the same asset at the same time.
If you continue to observe significant price discrepancies, I would recommend posting a detailed question on the QuantConnect forum with specific examples. The community there may be able to provide further insights.
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.
Justin E
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.
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!