# AI for Trading Series №9: Portfolio Risks and Returns

## Learn about the basics of portfolio theory, which are a key for designing portfolios for mutual funds.

Till now in our ‘AI for Trading Series’, we have learned about the indices and ETFs, their applications in the real world and how they work on a transaction level. In this article, we will look at the risks and return properties of a collection of stocks.

For example, consider a scenario where you have done your research and have come up with a list of stocks you want to invest in. You have calculated the amount of money you have to spend and you are now ready to buy those stocks that are needed to construct your portfolio for…

# Volatility

Volatility is the standard deviation of probability distribution of log returns. It is the measure of the spread of this particular distribution. Volatility gives a sense of range of values, log returns are likely to fall into.

Volatility can be used for :

• Measuring risks
• Defining position sizes
• Designing alpha factors
• Pricing options
• Trading volatility directly

## Historical Volatility

Calculating standard deviation of log returns of past data is known as historical volatility.

# AI for Trading Series №4: Time Series Modelling

## Learn about advanced methods for time series analysis including ARMA, ARIMA.

In this series, we will cover the following ways to perform time-series analysis-

1. Random Walk
2. Moving Averages Model (MA Model)
3. Autoregression Model (AR Model)
4. Autoregressive Moving Averages Model (ARMA Model)
5. Autoregressive Integrated Moving Averages (ARIMA Model)

# Random Walk Model

The random walk hypothesis is a financial theory stating that stock market prices evolve according to a random walk and thus cannot be predicted. A Random Walk Model beleives that [1]:

1. Changes in stock prices have the same distribution and are independent of each other.
2. Past movement or trend of a stock price or market cannot be used to predict its future movement.
3. It’s…

# AI for Trading Series №8: Exchange Traded Funds (ETFs)

## Learn about ETFs and how they are used by investors.

In this article, we will learn about the Exchange Traded Funds (ETFs) and how they work. To understand more about ETFs, let us first understand few drawbacks of open-ended and close-ended mutual funds. You can read more about what are open-ended and close-ended mutual funds in my post here.

# Drawbacks of Mutual Funds

## Drawbacks of Open-ended Mutual Funds

1. An open-ended mutual funds may need to maintain parts of their assets under management (AUM) in cash to let investors withdraw their shares on any given day. This dilutes the fund’s overall performance.
2. Open-ended mutual fund limits the number of times you can invest/withdraw within a time frame.
3. Fund share price…

# Index/Indices

## Overview

• Indices refer to an aggregated value of a group of stocks as a single number. For example, we have S&P500 and DJIA (Dow Jones Industrial Average) for USA, NIKKEI and HANG SENG for Asia and FTSE, EURO STOXX for Europe. These are all example of indices.
• Indices are created by financial research and credit rating companies such as Standard and Poor’s, Dow Jones and Financial Times. They are published by stock exchanges such as Nasdaq or the London Stock Exchange.
• Business news may refer to whether the index went up or down.
• They are virtual profiles and are not actual…

# Mean Reversion Trading

The two most popular types of trading strategies are Momentum and Mean Reversion. You can read more about the Momentum Trading strategy in my post here. A Mean Reversion Trading Strategy involves betting that prices will revert back towards the mean or average, whereas, the Momentum Trading Strategy predicts prices will continue in the same direction.

A simplistic example of a mean reversion strategy is to buy a stock after it has had an unusually large fall in price. …

# AI for Trading Series №3: Regression

## Learn about regression and how regression relates to trading and other advanced methods.

This series focuses on two main points:

• Checking and transforming data.
• Regression.

There are some visual ways to check if a distribution is normally distributed or not:

• Box-whisker plots helps us visually check if a distribution is symmetric or skewed.
• A histogram lets us check if a distribution is symmetric/skewed, and if it has fat tails.
• QQ plots help us compare any two distributions, so they can be used to compare distributions other than the normal distribution.

There are three hypothesis tests that can be used to decide if a data distribution is normal:

• Shapiro-Wilk test
• D’Agostino-Pearson test
• Kolmogorov-Smirnov test.

# AI for Trading Series №2: The Quant Workflow

## Learn about the overall quant workflow, including alpha signal generation, alpha combination and trading.

A hypothesis is an idea for a way to profit from trading. This hypothesis goes through a several phases of rigorous testing. After coming up with a hypothesis, next comes the research phase. In the research phase, we decide what set of positions to enter, on which assets and at what times in order to get positive future returns. After this phase, comes the testing phase which decides how much money to invest in each asset, in what conditions to exit positions and what are the risks. This is called back-testing.

# AI for Trading Series №1: The Stock Prices

Learn about basic terminologies used while analyzing stocks.

# Terminologies

## Basics

1. Stock : An asset that represents ownership in a company. A claim on part of a corportation’s assets and earnings. There are two main types, common and preferred.
2. Share : A single share represents partial ownership of a company relative to the total number of shares in existence.
3. Common Stock : One main type of stock; entitles the owner to receive dividends and to vote at shareholder meetings.
4. Preferred Stock : The other main type of stock; generally does not entail voting rights, but entitles the owner to a higher claim on…

## Purva Singh

Hi! I am a tech enthusiast currently working on leveraging language technologies to solve financial use-cases! View my work here: https://purvasingh96.github.io

Get the Medium app