NNFX-Backtrader
NNFX-Backtrader copied to clipboard
Is this working code?
Hello,
Getting random errors with this code, wondering if it working or not?
Traceback (most recent call last): File "nnfx.py", line 456, in <module> paths, names = file_browser() File "/home/victor/NNFX-Backtrader-master/custom_functions.py", line 176, in file_browser paths = [f.split('\\')[1] for f in glob.glob('./Data/*.csv')] File "/home/victor/NNFX-Backtrader-master/custom_functions.py", line 176, in <listcomp> paths = [f.split('\\')[1] for f in glob.glob('./Data/*.csv')] IndexError: list index out of range
Appreciate any assistance.
Cheers :)
Try changing f.split('\\') tof.split('/') at the end of custom_functions.py
@triorr thank you. @baldgzr no not really. I wrote this in a blitzkrieg focus state and haven't really worked on improving it since!
Edit: When I wrote this I didn't even know how to use a virtual environment so I'm not even sure which packages it depends on (or which versions). Sorry about that! Maybe one day I'll return to this and clean everything up and profile the code for speed.
Well it did run on my arch linux laptop. the slash thing is a simlpe portability error. I also had to downgrade matplotlib but that's matplotlib fault. I was looking for a back-tester for forex multi-assets, with compounding and I found your repos. A little bit of guidance on how to select other indicators and navigate the results would be really helpful. Thanks for sharing the code.
@triorr In general, the indicator setup is based around TALIB. So any TALIB indicator can be passed into the algorithm. I believe I have a brute force search optimizer file somewhere that I can commit for you to play with. Requires some serious computing time which I may configure for HPC setup with SLURM.
Let me know if you notice anything weird with multi-asset position sizing or TP/SL levels. Multi-asset is challenging. The other thing it does not do is monitor combined risk in positions involving the same currency because that's a whole other level.