Skip to content

Commit

Permalink
Update indicators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GiorgioMB authored Apr 8, 2024
1 parent 11efd37 commit df099a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stockdatamanager/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import pandas_datareader.data as web
from .datafetcher import Fetcher

class IndicatorCalculator:
"""
A utility class for performing various technical analysis calculations on stock market data.
Expand Down Expand Up @@ -1005,3 +1006,11 @@ def calculate_all(self, df: pd.DataFrame = None):
if col not in df.columns:
df[col] = new_df[col]
return df

def __repr__(self) -> str:
if self.ticker is not None:
return f"Technical Indicators for {self.yf_stock.ticker}"
elif self.ticker is None and self.df is not None:
return "Technical Indicators for external dataframe"
else:
return "Technical Indicators class"

0 comments on commit df099a3

Please sign in to comment.