Standard trend following stuff with a little extra sauce
Sorry, Quandl and CLS are only able to license this product for select use-cases. Please contact us and provide more information about your firm and how you plan on using the data. Our sales team will be in touch as soon as possible.
Out of curiosity: how is volume calculated for spot forex?
Take for example the EURUSD pair: is it the total dollar value of all euro buying and selling during a specified period of time? Something like xxx million USD during the last minute?
hoursToSample = []
for i in range(int(24/6)):
while True:
which = random.randrange(0,4,1)
hour = 6*i+which
if hour < 24 and hour not in hoursToSample:
break
hoursToSample.append(hour)
bar:model.Bar
self._logger.info("Sampling %s for %s",hoursToSample,instrument)
for bar in map(model.Bar,barsWithoutVolume):
if bar.baropen_datetime.time().hour not in hoursToSample: continue
bar.volume = ib.getTickVolumeForBar(instrument,bar,barSize)
class MyLittleJob(SpartanApp):
def run(self):
# model/database initialized, any IB connections created using centralized configuration
app = MyLittleJob()
app.run()
pipenv run python -m spartan.cli.mylittlejob
$ du -hcs __histdata_cache/
9.0G __histdata_cache/
$ _
Be careful in combining data from two different sources. They might not be aligned fully, resulting in strange results. Prices can be different, and so can trade volume.Hopefully the historical download will wrap up by the end of this week. Once that is done, I will need to catch up on ticks through IB as the above data source is only updated periodically, and not daily.
Be careful in combining data from two different sources. They might not be aligned fully, resulting in strange results. Prices can be different, and so can trade volume.