Python Forum
Controlling multiple portfolios - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Controlling multiple portfolios (/thread-22713.html)



Controlling multiple portfolios - semantina - Nov-23-2019

Hello,
Wanted to ask how this can be done. An analytical model generates 5 trade ideas each hour. These trade ideas need to be placed immediately at market and tracked as a separate portfolio. Such 5-trade portfolio will be opened each hour (on average 21 each day). Each portfolio will be closed at the loss of 50 points. Or when the holding period reaches 20 hours. I wonder how this can be done?! Can this be done in Python (if yes which libraries you recommend) or it will be easier to do this in VBA?
Any suggestions are highly welcome


RE: Controlling multiple portfolios - Larz60+ - Nov-23-2019

absolutely can be done in python, probably already has been done.
As to what you should use, you'll have to dig a bit, but some of these may help: https://pypi.org/search/?q=daytrader