vectorbt
vectorbt copied to clipboard
It is hard to use an outside data
Great library but I have my own data source and can't properly use it with vectorbt, it is all wrapped around yfinance and vectorbt data api. the data has to be a vectorbt object such as <vectorbt.data.custom.YFData at 0x1486f1640>
and there is no clear documentation around using external data.
vbt
supports any time series irrespective of source of data. All it needs is pandas series. What I typically do is either read from csv or make a call to api and fetch data into a df.
df = pd.read_csv(..) or api
then pass df['close]
or df['open']
etc to indicator based on strategy
@UmarIgan
Greetings,
After trying vectorpro, just use data class for migrating to the pro version easily!
Before (edited)
After playing with vectorbt for several weeks, I may give you two cents.
- Implement your own Data class.
- Using Pandas Pivot table to make sure each stock has its own column for ohlcv values.
After conquering this stage, you can enjoy the rest part of journey. Good luck!
Thanks, Greg