I think the readme contains a slightly wrong and misleading section.
From the readme.md:
select only price column, resample by time period and return daily ohlc (you can choose different time period)
ohlc = df["close"].resample("24h").ohlc()
This does not work / make sense, since pd.Series does not have a ohlc() method.
I'm not sure what this tries to accomplish either, since utils.resample does require a dataframe, not a single series.
standardize column names of your source
df.columns = ["date", 'close', 'volume']
I think this should include all ohlc[v] columns - to be in line with the comment 2 lines before that:
finta expects properly formated ohlc DataFrame, with column names in lowercase:
["open", "high", "low", close"] and ["volume"] for indicators that expect ohlcv input.
I think the readme contains a slightly wrong and misleading section.
From the readme.md:
This does not work / make sense, since
pd.Series
does not have aohlc()
method.I'm not sure what this tries to accomplish either, since utils.resample does require a dataframe, not a single series.
https://github.com/peerchemist/finta/blob/21a424291e8177ec1e9031b94f45de25ac31927d/finta/utils.py#L14-L19
2nd misleading section:
I think this should include all ohlc[v] columns - to be in line with the comment 2 lines before that: