cuemacro / finmarketpy

Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)
http://www.cuemacro.com
Apache License 2.0
3.46k stars 508 forks source link

Errors when trying to run fx_options_indices_examples #44

Closed vinipio closed 1 year ago

vinipio commented 1 year ago

Before anything, Id like to say big thanks for all this material. Very useful to FX Options community and traders in the world. I'm new to python coding, so Im sorry if Im making any mistakes.

When trying to run fx_options_indices_examples.py, I get some errors related to some of financepy module imports. I noticed that two diff modules from finmarketpy, fxoptionspricer.py and fxvolsurface.py, call for diff import commands - fxoptionspricer.py uses 0,193 financepy file structure (modules names start with "Fin") while fxvolsurface.py uses financepy 0.22 format.

running the code with 0.193 version of financepy, this is one of the errors that I get: "ModuleNotFoundError: No module named 'financepy.utils'"

what am I doing wrong here? Is it possible to fix it by running two versions of financepy ?

Thanks and regards, Vinicius

saeedamen commented 1 year ago

Hi Vinicius, would it be possible to make a pull request for the changes you suggested, so it uses financepy 0.22 (I think this mostly consist of changing various class names in fxoptionspricer.py)? Regards Saeed

vinipio commented 1 year ago

great, I'll do that! Thanks again, great work !