Coding investment strategies on iPad - is it possible?
-
Hello everyone,
I hope that you all are having a merry Christmas!
I am looking for some guidance to figure out if pythonista with an iPad can achieve my objectives. I am considering buying an iPad for its mobility, ease of use, privacy and battery life. I also want to learn coding and I know that the best way to learn something is by having a project of your own. I am passionate about investing and I would like to use code to build investment strategies and backtest them. If I were to do it in excel it would be: download price history of various assets, calculate the return for each of them then change my portfolio allocation over time to these assets based on various metrics (it could be external macro data or it could be metrics calculated on the returns themselves like which asset outperformed the most in the last 6 months for example).
So far do you believe such calculations could be done? I believe code could help me for example try to rebalance every last working day of the month, or on before last one...etc until you try all day and you don’t find a strategy that just got “lucky”.
A very quick googling from my iPhone lead me to this result: https://pypi.org/project/Backtesting/
Would this be usable from an iPad? I am sorry if I may sound lost, but I am planning on starting from scratch with zero coding experience besides knowing the English language and advanced excel (sadly no VBA).
Thank you all for your help, I truly hope this could work. The iPad is a great device and I would like to take 100% advantage of it.
Cheers,
Bertrand
-
I would recommend that you read the book "Automate the Boring Stuff with Python" https://automatetheboringstuff.com because it really talks about many of the things that you will need to explore. Completing its examples on Pythonista will give you a good sense of the platform and where it can sometimes be a bit more cumbersome than a desktop implementation of Python. Most of what you want to do is quite possible on an iPad with Pythonista but there will be a learning curve.
-
Hi ccc, thanks for getting back to me and great book tip, I will definitely have a look at it! In my specific case, on an iPad, I don’t know if automation is an objective but at work, in an excel spreadsheet, definitely!
One quick question though, the link I shared of the PIP backtesting module says in its description that it relies on Panda and I remember reading that Panda was not supported on Pythonista. Any idea if it will work at all?
Thanks!
-
Pandas is supposed in another iOS app named Pyto but unfortunately not in Pythonista.
-
@ccc got it thanks for the alternative app tip!
The exact description from the python backtest package was:
- Built on top of cutting-edge ecosystem libraries (i.e. Pandas, NumPy, Bokeh) for maximum usability.*
Hence I wanted to find out more about Pandas! Hopefully the others (NumPy and Bokeh) won’t cause any problems!
-
https://docs.bokeh.org/en/latest/index.html might be a problem but it is for visualizations so might not yet be on your critical path.
-
Thanks for all the help!
I am starting to question if starting this project from an iPad is a good idea as it seems like there are quite a few roadblock on top of a huge one: starting from scratch 🤔
-
Writing software is all about working around roadblocks. You can do it on an iPad or on a desktop but the two key things that you need are passion and perseverance. Keep taking small steps and you will be able to do great things.