Comments (2)
CsvDirLoader
was not designed to cover all situations when designing (too difficult), you can refer to QuandlLoader
(It has fewer lines) to rewrite one for your needs.
Answer your questions:
My broker provides me data feeds named (for instance) AAPL.txt (read: not .csv); can CsvDirLoader access those (without having to rename/link them?)
No, you need rename to *.csv. I will add a parameter in the future.
My broker "csv" data doesn't have a csv header, how can I tell CsvDirLoader which column is what?
This can be done by passing the pandas.read_csv
parameters, as an example:
loader = CsvDirLoader('path_to_files', parse_dates=True, prices_index='date', header=None, names=['date','open','high','low','close','volume'])
print(loader._load())
date | asset | open | high | low | close | volume | _time_cat_id |
---|---|---|---|---|---|---|---|
12/31/1980 | TEST | 0.4891 | 0.4891 | 0.4873 | 0.4873 | 11177100 | 0 |
12/31/1980 | TEST | 0.4926 | 0.4962 | 0.4926 | 0.4926 | 6772100 | 1 |
12/31/1980 | TEST | 0.4837 | 0.4837 | 0.4819 | 0.4819 | 11170100 | 2 |
Does spectre supports intraday data
Yes. But CsvDirLoader
needs time and date in one column. For your data, you may have to rewrite a DataLoader
.
from spectre.
Thank you, very useful, I have reformatted the data accordingly.
from spectre.
Related Issues (20)
- Adding Buy and sell signal to backtest graph HOT 2
- Error out on drawdown_split HOT 1
- how to calculate rolling factors HOT 1
- How to use it on gogle colab? HOT 2
- 'https://etfdailynews.com/etf/spy/' this page is invalid now
- sorry
- 请问如何用于**A股? HOT 6
- 请问您的回测程序功能是不是和zipline一样的 HOT 3
- pandas tz issue HOT 1
- universe池生成的位置疑问。 HOT 3
- 请教**股市数据导入zipline的方法
- 关于A股配股增发的复权处理
- 有停牌时,排序值好像不符合预期。 HOT 1
- engine.to_cpu() still requires the presence of gpu HOT 1
- How to add fundamentals data columns? HOT 3
- groupby with a column name HOT 2
- Backtest example graphs in README.md need updating? HOT 2
- how should OneHotEncoding be used? HOT 1
- GPU accellerated Backtest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectre.