MainDeck Flashcards Preview

CS7646 - ML4T > MainDeck > Flashcards

Flashcards in MainDeck Deck (98)
Loading flashcards...
1

Cumulative Returns

The total change in the price of an investment over a set time period

 

cumulative_return = (price[t] / prince[0] ) - 1

-or-

cumulative_return = (price at end / price the beginning ) - 1 price[t] is any particular day and price[0] is the price at the beginning

Lecture 01-04-12

2

Bollinger Bands (r)

Bands that are 2 standard deviations above and below the rolling mean.

Rolling mean +/- std deviation * 2

 

Lecture 01-04-07

3

Why is data not pristine

  • Data is an amalgamation of different sources and prices.
  • Not all stocks trade every day.

 

Lecture 01-05-02

4

Why does data go missing?

Some stocks stop trading and start trading. Some stock trade under the same ticker but different name. Some stocks trade erratically due to low market cap. 01-05-03

5

How do you fill gaps when there are gaps in data of a stock.

  • Fill forward first,
  • fill backwards second
  • do not interpolate a trend.

6

Why are Bollinger Bands important.

The theory states that if the stock crosses the bands then it may be a point to pay attention.

 

Lecture 01-04-07

7

Daily Returns

How much did the price go up or down on a particular day.

  • daily_return[t] = (price[t] / prince[t-1] ) - 1
    • t = day t

 

Lecture 01-04-10

8

How do you use a histogram to plot daily returns?

Take the daily return over a plot in time and fill the histogram values based on the number of occurrences of the daily returns.

Lecture 01-06-02

9

What would you expect a histogram of daily returns to look like?

A normal or Gaussian distribution.

 

Lecture 01-06-03

10

Kurtosis

The difference between a normal Gaussian distribution and the distribution of the.

Kurtosis is positive with larger tails and negative with skinny tails.

 

Lecture 01-06-06

11

beta (scatter plot)

  • When fitting a line to scatter plot, beta the slope of the line..
  • This indicates how reactive is the stock to the market.

 

Lecture 01-06-10

12

alpha (scatter plot)

  • When fitting a line to scatter plot, Alpha is where the line intercepts the vertical axis (y=0).
  • This indicates how the stock is returning compared to the market as a whole.

Lecture 01-06-10

13

How do you use a scatter plot to plot daily returns?

When comparing two stocks, take the daily returns of two stocks and plot (x, y) as (stock_a, stock_b).

Using linear regression plot the mean as a line to find beta and alpha.

E.G. when comparing a stock against the market as a whole

 

Lecture 01-06-09

14

Slope vs correlation.

Correlation is how tight the points are to the mean, where as the slope is just the slope of the line.

 

Lecture 01-07-11

15

What is a portfolio?

Allocation of funds to a set of stocks

Lecture 01-07-01

16

How do you calculate the total value of the portfolio day by day?

  • normalize the prices
  • multiply normalized values x portfolio allocations
  • Take that and multiply it by starting values
  • sum each row  

 

Lecture 01-07-02

17

Sharpe Ratio

Risk adjusted Return

  • Lower Risk is better
  • Higher return is better

(Rp - Rf) / σp

ex ante E[Rp - Rf] / STD[Rp]

  • Rp: portfolio return
  • Rf: risk free rate of return
  • σp: Standard Deviation of portfolio return

 

Lectures 01-07-05; 01-07-06

18

What is Risk free rate of return and where can you get it?

Return if you put your money into a bank

Can get it from

  • LIBOR
  • 3 Month Tbill 
  • or Just use 0%

 

Lecture 01-07-05; 01-07-11

19

How do you calculate daily risk free rate if using Libor or 3 month tbill.

  • Take the APR of the risk free option, (Libor, tbill)
  • Add 1 to the APR
  • Take the 252 root of that sum
  • subtract 1

 

Lecture 01-07-07

20

What is the annualized version of the sharpe ratio.

Since it was intended to be an annual measurement but can change based on frequencey of the sample SR

  • Annualized Sharpe Ratio = K * SR
  • K = sqrt(# of samples per year)
    • Daily K = sqrt(252)
    • Weekly K = sqrt(52)
    • Monthly K = sqrt(12)

 

Lecture 01-07-11

21

What is an optimizer?

  • Finds minimum Values of functions using convex polyogns
  • Build parameterized models based on data.
  • Refine allocations to stocks in portfolios.

 

Lecture 01-08-01

22

How to use an optimizer?

  • Provide a function to minimize
  • Provide an initial guess
  • Optimizer searches for the minima

 

Lecture 01-08-01

23

What are the methods do minimizers use?

Gradient Descent...

 

Lecture 01-08-02

24

How can minimizers be defeated?

  • Lines with no gradient 
  • Many local minima 
  • More than 1 global minimal 
  • discontinuous lines

 

Lecture 01-08-03; 01-08-04

25

What are the easiest type of problems for minimizers and why?

Convex Problems

Lecture 01-08-05

26

What is a convex function?

In mathematics, a real-valued function defined on an n-dimensional interval is called convex (or convex downward or concave upward) if the line segment between any two points on the graph of the function lies above or on the graph. Must have one minima.

 

Wiki https://en.wikipedia.org/wiki/Convex_function

Lecture 01-08-06

27

What is a parameterized model?

A model that take parameters or coefficients.

 

Lecture 01-08-07

28

What is a good error metric for models?

  • sum of all abs error
  • sum of square error

 

Lecture 01-08-08, 01-08-09

29

What is portfolio optimization?

  • Given a set of assets and a time period.
  • Find an allocation of funds to assets that maximizes performance.

Lecture 01-09-01

30

How do you measure performance in portfolio optimization?

  • Cumulative return
  • Volatility or risk
  • Sharpe Ratio (Risk adjusted return)

 

Lecture 01-09-01