renan-siqueira / python-investment-simulation-tool

A python tool to simulate investments from an asset portfolio in a time window
MIT License
3 stars 0 forks source link

Can you update MD file about how install correctly and some screenshots #14

Open johnfelipe opened 10 months ago

renan-siqueira commented 10 months ago

Is up to date. Please provide me with more information about what is happening when you try to use

johnfelipe commented 9 months ago
Collecting yfinance==0.2.32
  Downloading yfinance-0.2.32-py2.py3-none-any.whl (68 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.0/69.0 KB 17.1 MB/s eta 0:00:00
Installing collected packages: webencodings, pytz, peewee, multitasking, appdirs, urllib3, tzdata, soupsieve, six, pyparsing, Pillow, packaging, numpy, lxml, kiwisolver, idna, frozendict, fonttools, cycler, charset-normalizer, certifi, requests, python-dateutil, html5lib, contourpy, beautifulsoup4, pandas, matplotlib, yfinance
Successfully installed Pillow-10.1.0 appdirs-1.4.4 beautifulsoup4-4.12.2 certifi-2023.11.17 charset-normalizer-3.3.2 contourpy-1.2.0 cycler-0.12.1 fonttools-4.44.3 frozendict-2.3.8 html5lib-1.1 idna-3.4 kiwisolver-1.4.5 lxml-4.9.3 matplotlib-3.8.2 multitasking-0.0.11 numpy-1.26.2 packaging-23.2 pandas-2.1.3 peewee-3.17.0 pyparsing-3.1.1 python-dateutil-2.8.2 pytz-2023.3.post1 requests-2.31.0 six-1.16.0 soupsieve-2.5 tzdata-2023.3 urllib3-2.1.0 webencodings-0.5.1 yfinance-0.2.32
(env) root@template:~/python-investment-simulation-tool# python data_processor.py

freeze in that point THEN

Traceback (most recent call last):
  File "/root/python-investment-simulation-tool/data_processor.py", line 20, in <module>
    process_and_save_data(tickers)
  File "/root/python-investment-simulation-tool/data_processor.py", line 15, in process_and_save_data
    data.to_csv(f"{config.APP_PATH_ASSETS_CSV_FOLDER}/{ticker.lower()}.csv")
  File "/root/python-investment-simulation-tool/env/lib/python3.10/site-packages/pandas/core/generic.py", line 3902, in to_csv
    return DataFrameRenderer(formatter).to_csv(
  File "/root/python-investment-simulation-tool/env/lib/python3.10/site-packages/pandas/io/formats/format.py", line 1152, in to_csv
    csv_formatter.save()
  File "/root/python-investment-simulation-tool/env/lib/python3.10/site-packages/pandas/io/formats/csvs.py", line 247, in save
    with get_handle(
  File "/root/python-investment-simulation-tool/env/lib/python3.10/site-packages/pandas/io/common.py", line 739, in get_handle
    check_parent_directory(str(handle))
  File "/root/python-investment-simulation-tool/env/lib/python3.10/site-packages/pandas/io/common.py", line 604, in check_parent_directory
    raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
OSError: Cannot save file into a non-existent directory: 'assets/csv'

this havent web UI?

renan-siqueira commented 9 months ago

It's very simple to solve this, just create the "assets" and "csv" folders inside it or the structure configured inside the src/settings/config.py file:

image

*APP_PATH_ASSETS_CSV_FOLDER

Then tell me if it worked

johnfelipe commented 9 months ago

SNAG-0047

renan-siqueira commented 9 months ago

You need to get the data from the assets you want to analyze before running the analysis script. Include the symbols of the assets you want to extract in the json file:

image


After this, you can run main.py:

*** As the project is still in its infancy, you need to change the desired asset within the code before running main.py

image


Change the desired period and asset symbol:

image


As I mentioned, the project is still very early in development. I have many ideas to implement to make it efficient in comparative analysis. And I will also consider the idea you gave me. From next month I will work on it again.