If you are struggling to master Python or if you are wondering how to jump out of the beginner’s world, a single mindset change could help.
If you just started learning to program, especially outside the engineering world, it’s likely you started with Python these days.
It is an easy-to-learn language, but it may NOT be the best language to start with.
Type is one of the most important concepts in programming and probably the first thing you would need to understand.
But types are not obvious in Python, so that beginners are not trained to think with types.
Data comes first when we are talking about Finance and Python. However, I am not only talking about capturing the raw data but also the way to structure it and ideally creating a financial analytics API around the data.
Financial Analytics Data API (not raw data) should help us do research quicker and manage the process more consistantly.
This is such an important and fundamental piece of the modern asset management stack. This is the reason why big asset managers are spending millions on such Data APIs.
First of all, we need raw data and it should be point-in-time data…
If learning Python is one of your new year resolutions, please read.
Python definitely has been expanding in the Financial Industry in recent years. I am getting to know more and more people, who are not computer engineers, started learning Python, either to advance the career or being asked to do by the companies. One of the most common questions I have got is:
How can I really learn Python?
What they mean is that after finishing the Python tutorials, videos or books, they still find it difficult to apply Python to their day-to-day works.
One of the reasons why…
A new series of Python in Finance with a practical example. Let’s learn something about how professional money managers are handling the portfolios and where Python can be used.
With the limited amount of good quality data available for less cost, the most common articles on Medium are talking about using ML/AI to predict the returns with only the pricing data, which are less likely to generate long term stable returns, because we are missing the other important information.
In real life, professional money managers won’t do so. They have a very comprehensive method to make decisions on what asset…
Coding is the simplest part of the trading and the backtesting is only a start. Behind all the successes it is how we use it makes the difference. In this session, I would like to show how possibly we could use the backtesting.
In the last four sessions, we have built the trading backtesting tools (functions), which gives the top trading strategies for a given period. If you haven’t read the previous sessions, here is the link.
There will never be a single strategy working all the time. Market condition changes and human behaviour changes. …
There are many technical indicators we can trade with. The question is what is the best one for a given asset? We are going to answer this question by improving our backtesting from the last session.
In the last session, we have seen how to find the best combination of stop loss level and parameter with the strategy Keltner Channel. In this session, we will explore and adding other strategies into our backtesting.
If you haven’t read the previous sessions, here are the links.
Let’s have a quick review of our logic so far.
Find the best combination of stop loss level and parameter of Keltner Channel by turning the previous Python scripts into re-usable functions.
In our last session, we added stop loss into our trading simulation and we have done one more risk measure, Maximum Drawdown. We found the 2% stop loss lowered our performance but the maximum drawdown is not reduced dramatically.
If you haven’t read the previous two sessions, here are the links.
Will there be a good stop…
Python: Backtesting of Trading Strategy with Technical Indicator #2
In our last session, we used simple code and done the backtesting for a simple strategy using the Keltner Channel. We found that if we do the long-short trading with this signal, we could have earned more than 40% return in the year 2019 by trading ISF.L (UK FTSE 100 Index ETF), which only gained 14% in the year. If you haven’t read it yet, here’s the link.
In short, for managing the risk. It’s all…
Named Tuple and Python Data Model. Fill the knowledge gap as a Python developer.
Fluent Python in an efficient way. I am following the book “Fluent Python” and filling the knowledge gap. It is a thick book with 21 chapters and more than 700 pages. Hopefully, the quick study note can help more people to sharpen Python skills.
This is a less known type. We may have used list and tuple too much, as they are just too handy. We usually use a tuple to record information. For example, we have a list of student and each student has a…
Backtesting of Trading Strategy with Technical Indicator #1
Want to trade? Better to backtest the idea first. With this series, I want to extend Python Financial Series into practical tasks. We will use all we have learnt from the previous Python series to backtest trading strategy based on technical indicators. If you haven’t gone through the previous Python series, please check the following series.
I am planning to cover the following topics.
Coding dad of two little girls (always). Financial application developer and technical sales. Stay real!