-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Finta technical indicators library #79
Comments
To precompute indicators lazily, you'd need to call self.sma1 = self.I(TA.SMA, self.data, self.timePeriod1) # func with parameters It still won't exactly work, though, due to capitalized columns, which you'd need to rename. #47 adds df = self.data.Close.to_series().rename('close').to_frame()
self.sma1 = self.I(TA.SMA, df, self.timePeriod1) |
@kernc Sorry, but I have another question related to this topic. I'm trying to use the ATR Indicator from the Finta Indicator Library. But this indicator requires the high, low and close column (lowercase). I've tried to rename the columns but got an AtributeError. df = self.data.rename({'Open': 'open', 'High': 'high', 'Low': 'low', 'Close': 'close', 'Volume': 'volume'}, axis=1)
|
Yeah, After #47, you'll be able to do: df = self.data.df.set_axis(self.data.df.columns.str.lower(), axis=1) For now, I guess: df = pd.DataFrame({'open': self.data.Open,
...
'close': self.data.Close},
index=self.data.index) |
Thanks. Yeah, I'm really looking forward for this pull request to be merged! |
I'm trying to use finta as techinical indicators library. But they require lowercase column names.
First I tried to rename the df when creating the indicators (self.I) and than back to first letter uppercase but then I got an error (KeyError).
Code:
Error:
Than I changed the finta source code the first letter uppercase but than I got another error (AttributeError).
Code:
Error:
Can someone help me?
The text was updated successfully, but these errors were encountered: