portfolio_toolkit.position.open.open_position module

class portfolio_toolkit.position.open.open_position.OpenPosition(ticker: str, buy_price: float, quantity: float, current_price: float, sector: str, country: str)[source]

Bases: Position

current_price: float
sector: str
country: str
value: float
classmethod to_list(positions: List[OpenPosition]) List[dict][source]

Convert a list of Position objects to a list of dictionaries.

classmethod to_dataframe(positions: List[OpenPosition]) DataFrame[source]

Convert a list of Position objects to a pandas DataFrame.

__init__(ticker: str, buy_price: float, quantity: float, current_price: float, sector: str, country: str) None
ticker: str
buy_price: float
quantity: float
cost: float