r/algorithmictrading • u/Lwazeem • Dec 10 '23
Is Excel to Python an upgrade? Is it necessary?
Hi
I am a profitable trader who uses an MS Excel model. It receives OHLC data of all the major currency pairs (the 28 pairs formed between USD, CAD, CHF, JPY, GBP, EUR, AUD and NZD, in real-time. It then auto-computes levels, ranges, trends, across multiple time frames (Weekly to Hourly), and identifies the single pair that has the highest probability to move on the following day. I place that one trade a day, at a very good profit factor and % wins.
It has taken me 6 years to get the model as advanced and as profitable as it is now. I am decent in Excel (not a master), and use macros to automate almost everything. There was a lot of learning along the way in building this model, and I did not know it would take 6 years to become a product I would not sell for 6 figures.
I know some Matlab, but I am not a programmer. I am an ex-engineer-turned-trader. Is it worth it to learn Python or a more advanced programming language and to re-create my system on such a platform? Or should I just be happy with my Excel system, and leave things the way it.
I appreciate the comments.
Regards,
2
u/darkmoon81 Dec 11 '23
Sounds like a cool model. Congrats, and props for sticking to it for 6 years!
2
u/Sandiegoman99 Feb 21 '24
definitely do it.
The amount of libraries available for expanding your system will blow your mind.
Keep your excel going and up to date
Work on the python equivalent
Compare and switch
The backtesting and financial libraries are worth it. Excel won't keep up. Its quite likely qhat your are currently doing will morph over time. It will be much better to use Python to keep up to those changes.
4
u/Capable_Fig Dec 10 '23
If you want to learn Python, go for it. It's fun and straightforward.
Pros: lower weight, easier iterability for new ideas, faster trade execution (though that doesn't seem to be what you're looking for)
Cons: if ain't broke...
1
u/crispcrouton Dec 11 '23
sorry for the interruption but can you point me towards quality resources to learn using excel for algotrading?
2
u/Apprehensive-Donkey3 Dec 12 '23
Since no one has actually given an answer, I will put in my two cents.
Essentially, each programming language has strengths and weaknesses, but none are necessarily an "upgrade" versus another. It all depends on what you want to do.
The strength of Python is that it has a large community following, replete with tutorials, plugins, API support, libraries, and all sorts of goodies/knick-knacks that allow you to fudge together code which usually does what you intend. The main weakness of Python is that it is slow (especially compared to languages such as C++). It's not usually perceptibly slower for most things, until you are trying very math heavy codes like financial analysis or simulations.
I once built a scraper bot that compared millions of financial data points at once to determine trends. In Python, the slow performance meant that it would usually miss the trend I was looking for. Rebuilding it in C++ made it fast enough to do what I needed.
Similarly, I once tried to use C++ to pair with my broker through some backdoor GitHub API and ended up tearing my hair out. Making it in Python with the bazillion pip libraries enabled me to automate in just an afternoon.
It might be worth looking at a deep dive video on the differences between coding languages to see what best fits your current set-up. After all, there are going to be details and idiosyncrasies which you understand and we do not. It's entirely possible that your current method works so well simply BECAUSE you are doing it in Excel and that is a novel take.
I will also leave the point that Python has CSV read/write capabilities that may make it possible to integrate and enhance what you have already done in Excel. But that is just a wild guess
1
u/Isotope1 Dec 10 '23
If you can do all that, and some MATLAB, Python will be easy for you. Spend a day doing a Pandas tutorial and you’ll know if it’s useful for you.
1
u/m98789 Dec 10 '23
You can save money and time by having an expert just rewrite it for you in Python and provide you the documentation. Then you can study it and take ownership of the code going forward.
1
u/proverbialbunny Dec 19 '23
A bit of backstory that might help inform: The job title Data Scientist was created when datasets got large enough at companies Excel wouldn't work any more. Back then Excel would crash before you maxed out rows and calculating anything could take hours. To fix this issue researchers moved from using Excel to do their modeling and analytics to using dataframes.
A dataframe is for all intents and purposes a spreadsheet in a programming language. The most popular two dataframes are dataframes in the R programming language and Pandas dataframes in Python.
The reason Python (and R) is so popular today is because these people are doing the same thing they would be doing in a spreadsheet, but with way more power. They can import libraries instead of having to manually code everything in. Likewise using notebooks cache variables in half ran code which speeds up processing, and notebooks display plots just like Excel, so you get the full replacement. This is why most people use R + RStudio or Python + VSCode (or another notebook IDE like Jupyter Lab) + Pandas + plot.ly or another plotting library. It has non of the weakness Excel has.
In short, yes Python is better. However, the learning curve is a bit higher, but once you figure it out it's easier to program dataframes than it is to program using the Excel programming language.
0
u/[deleted] Dec 11 '23
[deleted] — view deleted comment
1
u/[deleted] Dec 10 '23 edited Dec 10 '23
[removed] — view removed comment