Options research trading strategies module sample paper
This module will last one semester. It consists of about 30 sessions of 45 minutes each. These will be divided into about 20 lectures and 10 classes. Some background in maths and statistics is required. Students are responsible for meeting the cost of essential textbooks, and of producing such essays, assignments, laboratory reports and dissertations as are required to fulfil the academic requirements for each programme of study.
Undergraduate Postgraduate taught Postgraduate research Foundation Years How to apply Free online learning Continuing professional development Prospectuses Pre-sessional English language courses.
Module Overview In the last 30 years derivatives have become increasingly important in finance and many different types of derivatives are actively traded on exchanges throughout the world. Aims and Objectives Module Aims to provide you with a solid background in futures, forwards and options with a particular focus on contracts where the underlying asset is a stock market index. Learning Outcomes Knowledge and Understanding Having successfully completed this module, you will be able to demonstrate knowledge and understanding of: In this section we will consider software both open source and commercial that exists for both For-Loop and Event-Driven systems.
There are plenty of code snippets to be found on quant blogs. A great list of such blogs can be found on Quantocracy. The expensive commercial offerings include Deltix and QuantHouse. They are often found in quant hedge funds, family offices and prop trading firms.
Cloud-based backtesting and live trading systems are relatively new. Quantopian is an example of a mature web-based setup for both backtesting and live trading. Institutional quants often also build their own in house software. In terms of open source software, there are many libraries available. One of the most important aspects, however, is that no matter which piece of software you ultimately use, it must be paired with an equally solid source of financial data.
Otherwise you will be in a situation of "garbage in, garbage out" and your live trading results will differ substantially from your backtests. While software takes care of the details for us, it hides us from many implementation details that are often crucial when we wish to expand our trading strategy complexity.
At some point it is often necessary to write our own systems and the first question that arises is "Which programming language should I use? Despite having a background as a quantitative software developer I am not personally interested in "language wars". There are only so many hours in the day and, as quants, we need to get things done - not spend time arguing language design on internet forums! Python is an extremely easy to learn programming language and is often the first language individuals come into contact with when they decide to learn programming.
It has a standard library of tools that can read in nearly any form of data imaginable and talk to any other "service" very easily. While it is great for ML and general data science, it does suffer a bit for more extensive classical statistical methods and time series analysis.
It is great for building both For-Loop and Event-Driven backtesting systems. In fact, it is perhaps one of the only languages that straightforwardly permits end-to-end research, backtesting, deployment, live trading, reporting and monitoring. However, work is being carried out to improve this problem and over time Python is becoming faster.
R is a statistical programming environment, rather than a full-fledged "first class programming language" although some might argue otherwise! It is widely used for For-Loop backtesting, often via the quantmod library, but is not particularly well suited to Event-Driven systems or live trading. It does however excel at strategy research. This is its primary advantage. Unfortunately it is painful for carrying out strategy research.
Due to being statically-typed it is quite tricky to easily load, read and format data compared to Python or R. You may also wish to take a look at Java, Scala, C , Julia and many of the functional languages. It is a great learning experience to write your own Event-Driven backtesting system. Firstly, it forces you to consider all aspects of your trading infrastructure, not just spend hours tinkering on a particular strategy.
Even if you don't end up using the system for live trading, it will provide you with a huge number of questions that you should be asking of your commercial or FOSS backtesting vendors. While Event-Driven systems are not quick or easy to write, the experience will pay huge educational dividends later on in your quant trading career.
They are all written in Python due to the reasons I outlined above and thankfully Python is very much like reading pseudo-code. That is, it is very easy to follow. I've also written many articles on Event-Driven backtest design, which you can find here , that guide you through the development of each module of the system. Rob Carver, at Investment Idiocy also lays out his approach to building such systems to trade futures.
Remember that you don't have to be an expert on day 1. You can take it slowly, day-by-day, module-by-module. If you need help, you can always contact me or other willing quant bloggers. See the end of the article for my contact email. I'll now discuss the modules that are often found in many Event-Driven backtesting systems.
While not an exhaustive list, it should give you a "flavour" of how such systems are designed. This is where all of the historical pricing data is stored, along with your trading history, once live. Ideally, we want to obtain and store tick-level data as it gives us an idea of trading spreads. It also means we can construct our own OHLC bars, at lower frequencies, if desired. We should always be aware of handling corporate actions such as stock splits and dividends , survivorship bias stock de-listing as well as tracking the timezone differences between various exchanges.
Data itself is becoming cheaper and "democratised" via sites like Quandl. There are still plenty of markets and strategies that are too small for the big funds to be interested in. This is a fertile ground for retail quant traders. The trading strategy module in an Event-Driven system generally runs some kind of predictive or filtration mechanism on new market data.
It receives bar or tick data and then uses these mechanisms to produce a trading signal to long or short an asset. This module is NOT designed to produce a quantity, that is carried out via the position-sizing module. This is because I think it is far easier to increase expected returns by reducing costs through proper risk management and position sizing, rather than chasing strategies with "more alpha". It is the area which requires the most development time and quality assurance testing.
The goal of this system is to go from the current portfolio to the desired portfolio , while minimising risk and reducing transaction costs. The module ties together the strategy, risk, position sizing and order execution capabilities of the sytem.
It also handles the position calculations while backtesting to mimic a brokerage's own calculations. The primary advantage of using such a complex system is that it allows a variety of financial instruments to be handled under a single portfolio. This is necessary for insitutional-style portfolios with hedging. Such complexity is very tricky to code in a For-Loop backtesting system.
Separating out the risk management into its own module can be extremely advantageous. The module can modify, add or veto orders that are sent from the portfolio. In particular, the risk module can add hedges to maintain market neutrality. It can reduce order sizes due to sector exposure or ADV limits. It can completely veto a trade if the spread is too wide, or fees are too large relative to the trade size. A separate position sizing module can implement volatility estimation and position sizing rules such as Kelly leverage.
In fact, utilising a modular approach allows extensive customisation here, without affecting any of the strategy or execution code. Such topics are not well-represented in the quant blogosphere. However, this is probably the biggest difference between how institutions and some retail traders think about their trading. Perhaps the simplest way to get better returns is to begin implementing risk management and position sizing in this manner.
We must consider transactional issues such as capacity, spread, fees, slippage, market impact and other algorithmic execution concerns, otherwise our backtesting returns are likely to be vastly overstated.
The modular approach of an Event-Driven system allows us to easily switch-out the BacktestExecutionHandler with the LiveExecutionHandler and deploy to the remote server. We can also easily add multiple brokerages utilising the OOP concept of "inheritance". One issue to be aware of is that of "trust" with third party libraries. There are many such modules that make it easy to talk to brokerages, but it is necessary to perform your own testing. Make sure you are completely happy with these libraries before committing extensive capital, otherwise you could lose a lot of money simply due to bugs in these modules.
Retail quants can and should borrow the sophisticated reporting techniques utilised by institutional quants. Consistent incremental improvements should be made to this infrastructure. This can really enchance returns over the long term, simply by eliminating bugs and improving issues such as trade latency. Don't simply become fixated on improving the "world's greatest strategy" WGS. The WGS will eventually erode due to "alpha decay". Others will eventually discover the edge and will arbitrage away the returns.
However, a robust trading infrastructure, a solid strategy research pipeline and continual learning are great ways of avoiding this fate.
Infrastructure optimisation may be more "boring" than strategy development but it becomes significantly less boring when your returns are improved! Deployment to a remote server, along with extensive monitoring of this remote system, is absolutely crucial for institutional grade systems. Retail quants can and should utilise these ideas as well. A robust system must be remotely deployed in "the cloud" or co-located near an exchange. Often things fail right at the worst time and lead to substantial losses.
There are many vendors on offer that provide relatively straightforward cloud deployments, including Amazon Web Services, Microsoft Azure, Google and Rackspace. For software engineering tasks vendors include Github, Bitbucket, Travis, Loggly and Splunk, as well as many others. Unfortunately there is no "quick fix" in quant trading.
It involves a lot of hard work and learning in order to be successful. Perhaps a major stumbling block for beginners and some intermediate quants! Such strategies always eventually succumb to alpha decay and thus become unprofitable. Hence it is necessary to be continually researching new strategies to add to a portfolio. In essence, the "strategy pipeline" should always be full. It is also worth investing a lot of time in your trading infrastructure.
Spend time on issues such as deployment and monitoring. Always try and be reducing transaction costs, as profitability is as much about reducing costs as it is about gaining trading revenue. I recommend writing your own backtesting system simply to learn. You can either use it and continually improve it or you can find a vendor and then ask them all of the questions that you have discovered when you built your own.
It will certainly make you aware of the limitations of commercially available systems. Finally, always be reading, learning and improving. There are a wealth of textbooks, trade journals, academic journals, quant blogs, forums and magazines which discuss all aspects of trading. Perhaps my two biggest takeaways from working in an institutional setting are the vast chasm between backtests and live trading, as well as the importance of thinking at a portfolio level and the associated risk management thereof.
Coming from a scientific background means that I'm very passionate about knowledge sharing and open-source software. Regular visitors will know that this is a running theme through QuantStart. QuantStart itself was founded in late A lot has changed in quantitative finance since then! The site discusses quant trading, quant careers, data science, machine learning and mathematics education. In particular, the site discusses a lot of implementation details that are often ignored, but I find to be absolutely necessary.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian.
In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of , as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein.
If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website.
The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory or other services by Quantopian.
In addition, the content of the website offers no opinion with respect to the suitability of any security or any specific investment. Quantopian makes no guarantees as to accuracy or completeness of the views expressed in the website. All investments involve risk — including loss of principal. You should consult with an investment professional before making any investment decisions.
Back to all posts. QuantCon Guest Post by Michael Halls-Moore About This Post The post is suitable for those who are beginning quantitative trading as well as those who have had some experience with the area. What Is A Backtest? A backtest is the application of trading strategy rules to a set of historical pricing data. Backtesting Pitfalls There are many pitfalls associated with backtesting. Some of the more common pitfalls include: