Skip to content

Commit 3510805

Browse files
committed
Add FinancialDataProvider abstract class
1 parent 8478d05 commit 3510805

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
streamlit
22
pytest
33
streamlit-extras
4+
pandas
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from abc import ABC, abstractmethod
2+
3+
import pandas as pd
4+
5+
6+
class FinancialDataProvider(ABC):
7+
def __init__(self, ticker: str):
8+
self.ticker = ticker
9+
10+
@abstractmethod
11+
def get_historical_data(self, period: str, interval: str) -> pd.DataFrame:
12+
pass
13+
14+
@abstractmethod
15+
def get_stock_info(self):
16+
pass
17+
18+
@abstractmethod
19+
def get_balance_sheet(self):
20+
pass
21+
22+
@abstractmethod
23+
def get_income_statement(self):
24+
pass
25+
26+
@abstractmethod
27+
def get_cash_flow(self):
28+
pass

src/data_providers/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)