forked from pst-group/pysystemtrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsv_futures_sim_data.py
More file actions
executable file
·36 lines (26 loc) · 1.31 KB
/
csv_futures_sim_data.py
File metadata and controls
executable file
·36 lines (26 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Get data from .csv files used for futures trading
"""
from syscore.objects import arg_not_supplied
from sysdata.csv.csv_multiple_prices import csvFuturesMultiplePricesData
from sysdata.csv.csv_adjusted_prices import csvFuturesAdjustedPricesData
from sysdata.csv.csv_spot_fx import csvFxPricesData
from sysdata.csv.csv_instrument_data import csvFuturesInstrumentData
from sysdata.data_blob import dataBlob
from sysdata.sim.futures_sim_data_with_data_blob import genericBlobUsingFuturesSimData
from syslogdiag.log import logtoscreen
class csvFuturesSimData(genericBlobUsingFuturesSimData):
"""
Uses default paths for .csv files, pass in dict of csv_data_paths to modify
"""
def __init__(self, csv_data_paths = arg_not_supplied, log =logtoscreen("csvFuturesSimData")):
data = dataBlob(log = log,
csv_data_paths = csv_data_paths,
class_list=[csvFuturesAdjustedPricesData,
csvFuturesMultiplePricesData,
csvFuturesInstrumentData,
csvFxPricesData])
super().__init__(data = data)
def __repr__(self):
return "csvFuturesSimData object with %d instruments" % len(
self.get_instrument_list())