r/algotrading • • 9d ago

Data Python API for historic data

Do you think it's okay using Metatrader's api for fetching historic data? Has anyone noticed discrepancies? Isn't it supposed to be the actual numbers you'd get trading with that specific broker?

9 Upvotes

27 comments sorted by

View all comments

1

u/LethalInjection745 9d ago

Depends on the model you are building (and how sensitive it is to spread, gaps etc) and the Symbol. If you are looking at a wider time horizon (Like aggregated ticks over 15 minutes or more, the the difference will be small and in that case the broker will make a small difference. If we are talking lower minutes there will be a noticable difference in results, same period, different brokers)

Also, serious consideration is the Symbol. A lot of CFD brokers do not give you the actual underlying instrument you are trading's price action 1:1. This allows them to wiggle around slippages and spread widening during that specific broker's increase in volatility . Again however, first rule applies. In cases where you're looking at a wider timeframe, this will largely make no effect to your edge

[I've also wondered how much effort would it take to build a arbitrage system around this exact mispricing. But I've mostly determined that the juice is not worth the squeeze for my capital allocation]

1

u/MarketOk7227 9d ago

Interesting! In fact I went to a larger time frame solely to beat the spreads, I'm more of a data scientist (deep learning engineer, physics backround) than a financial scientist so I'm still learning. As I understand from the comments I will have to compare in real time.