import-histdata

command
v0.0.0-...-ab5ca81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 9 Imported by: 0

README

histdata.com import

Import prices (ticks) from histdata.com for backtesting. They offer data for forex, gold, and SP500.

Full list of supported instruments.

Usage

Download CSV files

Change period and instrument in histdata.rb:

for i_date in 2020..2021 # change date

and

fxpair = 'SPXUSD' # change your instrument

Then run the script. CSV files should be downloading now.

./cmd/import-histdata/histdata.rb
Unzip files
mv HISTDATA* data/
find ./data/ -name 'HISTDATA*zip' -exec unzip {} \;
Import

Now run the importer which generates 1min candles and stores them to local sqlite DB:

INSTRUMENT="SPXUSD" IMPORT_HISTDATA_CSV_FILES=`ls *.csv | tr "\n" ","` go run cmd/import-histdata/main.go

Then you can run the backtesting tool to use the data with the .db file in ./data.

TODOs

  • Remove ruby script and support downloading CSV files in the Go program.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL