gran4 / AI-InvestiBot

Innovative, high quality stock bot
MIT License
19 stars 7 forks source link

add typing and company_symbols was not initalised #94

Closed alexpvpmindustry closed 1 year ago

alexpvpmindustry commented 1 year ago

there is still errors after these changes

Traceback (most recent call last):
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\implementation.py", line 298, in <module>
    models, total_info_keys = load_models(strategys=[ImpulseMACD_indicators])
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\implementation.py", line 88, in load_models
    model = model_class(stock_symbol=company, information_keys=strategy)
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\models.py", line 842, in __init__
    super().__init__(start_date=start_date,
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\models.py", line 88, in __init__
    with open(f'Stocks/{stock_symbol}/dynamic_tuning.json', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'Stocks/AAPL/dynamic_tuning.json'

I think its because of the base_model not initialised any of these

end_date: Optional[Union[date, str]] = None,
stock_symbol: Optional[Union[date, str]] = "AAPL",
num_days: int = None,
information_keys: List[str]=["Close"]) -> None:
gran4 commented 1 year ago

I fixed them in my other PR that is still open.