MainDeck Flashcards

1
Q

Cumulative Returns

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Bollinger Bands (r)

A

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

Rolling mean +/- std deviation * 2

Lecture 01-04-07

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is data not pristine

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

Lecture 01-05-02

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why does data go missing?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A
  • Fill forward first,
  • fill backwards second
  • do not interpolate a trend.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why are Bollinger Bands important.

A

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

Lecture 01-04-07

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Daily Returns

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you use a histogram to plot daily returns?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

A normal or Gaussian distribution.

Lecture 01-06-03

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Kurtosis

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

beta (scatter plot)

A
  • 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

alpha (scatter plot)

A
  • 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Slope vs correlation.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a portfolio?

A

Allocation of funds to a set of stocks

Lecture 01-07-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

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

Lecture 01-07-02

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Sharpe Ratio

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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

A
  • 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the annualized version of the sharpe ratio.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is an optimizer?

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

Lecture 01-08-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How to use an optimizer?

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

Lecture 01-08-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the methods do minimizers use?

A

Gradient Descent…

Lecture 01-08-02

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How can minimizers be defeated?

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

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

A

Convex Problems

Lecture 01-08-05

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is a convex function?

A

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*
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is a parameterized model?

A

A model that take parameters or coefficients.

Lecture 01-08-07

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is a good error metric for models?

A
  • sum of all abs error
  • sum of square error

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is portfolio optimization?

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

Lecture 01-09-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

How do you measure performance in portfolio optimization?

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

Lecture 01-09-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

How can historical reference help a portfolio going forward?

A

Optimize for Sharpe ratio month by month.

Lecture 01-09-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

How to optimize for sharpe ratio?

A

Since minimizer focus on minimizing a metric you can optimize for SharpeRatio * -1 (negative sharpeRatio)

Lecture 01-09-05

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What Ranges or constraints should be set when optimizing for sharpe ratio?

A
  • Ranges: Limit x between 0 - 1 since x allocations a distribution of funds.
  • Constraints: Sum of allocations must = 1.0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Compare Sharpe Ratio to Cumulative Return

A

Sharpe Ratio is a better measure since it takes volatility into account. SR is a risk adjusted return.

Lecture 01-07-05

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are rolling statistics?

A

Snapshot of stats (mean, median, std), that follows but lags the actual value

  • rolling mean is the simple moving average
  • where stock crosses rolling mean is a technical indicator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

ETF

A

Exchange Traded Fund

  • Tied to an index
  • Buy Sell like stocks
  • Baskets of stocks
  • Transparent

Lecture 02-01-03

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Mutual Funds

A

A fund that pools money from many investors and invests the money in securities such as stocks, bonds, and short-term debt

  • Buy / Sell at end of day.
  • Quarterly disclosure
  • Less Transparent than ETFs

Lecture 02-01-03

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Hedge Fund

A

a limited partnership of investors that uses high risk methods, such as investing with borrowed money, in hopes of realizing large capital gains.

  • Buy / Sell by agreement
  • No disclosure
  • Not transparent
  • Small groups of wealth investors

Lecture 02-01-03

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Liquid

A

The ease at which one buy or sell shares in a particular holding.

Lecture 02-01-04

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Capitalization (Large Cap / Small cap)

A

How much is the company worth, according to the [# of outstanding shares] * [price of the stock].

Lecture 02-01-04

41
Q

Assets Under Management

A

How much money is being managed by the fund.

Lecture 02-01-06

42
Q

Expense Ratio

A

A percentage of the fund used for compensating the manager.

Lecture 02-01-06

43
Q

How are fund managers compensated.

A
  • ETF: Expense Ratio 0.01% -> 1.00%
  • Mutual Fund: Expense Ratio 0.5% -> 3.00%
  • Hedge Fund: e.g. Two and Twenty (2% of AUM, 20% of Profit)

Lecture 02-01-06

44
Q

How are fund investors compensated.

A

Based on the value of the fund. Similar to any stock.

Lecture 02-01-06

45
Q

Who are hedge fund investors?

A
  • Individuals - Wealthy folks
  • Institutions - Large retirement funds, Harvard university foundation.
  • Funds of Funds -A fund that has several hedge funds.

Lecture 02-01-09

46
Q

Why would someone want to invest in a particular hedge fund?

A
  • Track record of success. 5yrs.
  • Simulations and story to prove Track record.
  • Good portfolio fit, or how it fits within their portfolio.

Lecture 02-01-09

47
Q

What are the primary hedge fund goals?

A
  • Beat a benchmark, e.g. beat SP500 Absolute return
  • Provide positive return no matter what. Slow gradual positive return.

Lecture 02-01-10

48
Q

What are the metrics for a hedge fund?

A
  • Cumulative return
  • Volatility
  • Risk / Reward (Sharpe ratio)

Lecture 02-01-10

49
Q

What are X and Y in machine learning

A
  • x is a vector of features (factors)
  • y (labels) is a prediction
    • discreet value for classification
    • continuous value for regression

Lecture 03-01-02

50
Q

Regression

A

Numerical approximation based on the mean.

Lecture 03-01-02

51
Q

Supervised Learning

A

Providing both data (x) and labels (y) while training

Lecture 03-01-02

52
Q

Backtesting

A

Testing against a historical reference e.g. rolling back time and test the system against the data from that time.

Lecture 03-01-09

53
Q

Problems with regression

A
  • Noisy and uncertain
  • hard to estimate confidence, holding time, allocations, etc..

Lecture 03-01-11

54
Q

Linear Regression / Parametric models

A

Fitting a Linear or polynomial line to the data.

Lecture 03-02-02

55
Q

KNN

A

K Nearest Neighbor

  • Instance learner
  • Find K nearest points based on distance metric
  • Take the mean of K neighbors

Lecture 03-02-03; 03-02-04

56
Q

How do you create test/train sets in financial data.

A

Use older data for training and newer data for testing to avoid possible look ahead bias.

Lecture 03-02-07

57
Q

How does the value of K impact KNN

A
  • Lower K greater likelihood of overfitting.
  • Higher K greater likelihood of underfitting.

Lecture 03-03-02

58
Q

Hows does D impact a parametric model.

A

D is the order of polynomial.
Higher D fits the line closer to the data increasing likelihood of overfitting.

Lecture 03-03-04

59
Q

RMSE

A

Root Mean Squared Error.

sqrt( sum(y_test - y_predict) ^2 / n)

Lecture 03-03-05

60
Q

Out of sample error

A

Error from a test or hold out set not included in the training set.

Lecture 03-03-06

61
Q

Cross Validation

A
  • Break the data into n chunks
  • train on n-1 chunks and test on 1.
  • Repeat this over the whole dataset slowly rolling forward.

Lecture 03-03-08

62
Q

Roll Forward Cross Validation

A

Similar to standard cross validation, but ensuring that the training data is always before the testing data in time.

Lecture 03-03-09

63
Q

Correlation

A

How close the data fits the line or model.

Lecture 03-03-10

64
Q

Overfitting

A
  • In sample error is decreasing and out of sample error is increasing
  • Model is fit exactly to the data and cannot generalize data it has not yet seen.

Lecture 03-03-12

65
Q

Ensemble Learner

A

A set of weak learners combined to form a strong learner.

Lecture 03-04-01

66
Q

What is an order?

A

An order is Buying or Selling a particular stock Symbol for a #Shares at Limit or Market Price

Lecture 02-02-02

67
Q

Limit Order

A

Transaction occurs at a specified price limit

Lecture 02-02-02

68
Q

Market Order

A

Transaction occurs at market value

Lecture 02-02-02

69
Q

Order Book

A

A list of Asks to buy and Bids to sell stock.

Items are queued up. As bids and asks meet requirements then those transactions are completed

Lecture 02-02-05

70
Q

How to get orders to the exchange.

A
  • User requests order from broker.
  • Broker Requests from exchange with the best price.
  • or -
    If another user with the same broker has a counter order they could facilitate without going to the exchange, as long as the price is in line with the exchange.

Lecture 02-02-06

71
Q

Dark Pool

A
  • An intermediary between brokerages and exchanges.
  • Pay the brokers to look at the data, and take advantageous trades without going to the exchange.

Lecture 02-02-06

72
Q

Order Book Exploit

A
  • Hedge fund observes the order book
  • Hedge fund buys the stock
  • Users buys the stock.
  • In milliseconds the price goes up
  • Hedgefund sells the stock at profit.

Lecture 02-02-07

73
Q

Geographic Arbitrage Exploit

A
  • Hedgefund locates at two exchanges
  • Watches for differences between two exchanges
  • Buys at lower price exchange
  • Sells at higher price exchange

Lecture 02-02-07

74
Q

Stop Loss

A

When the stock reaches a certain price (lower) sell it

Lecture 02-02-08

75
Q

Stop Gain

A

When the stock reaches a higher price sell it.

Lecture 02-02-08

76
Q

Trailing Stop

A

Stop loss that moves with the price.

Lecture 02-02-08

77
Q

Selling Short

A
  • Take a negative position on the stock through a broker.
  • Borrow shares
  • Sell them to someone else
  • Exit by Buying shares back and giving them back

Lecture 02-02-08

78
Q

Why Company value matters

A
  • In general the value of a company goes up monotonically.
  • The stock market evaluates the price will deviate from true value.
  • This can lead to trading strategies that capitalize on that difference.

Lecture 02-03-03

79
Q

Value of a future Dollar

A

P.V. = F.V./(1+IR)^i

Present Value = Future Value / (1 + Interest Rate)^ how far into the future.

Lecture 02-03-05

80
Q

Discount Rate

A
  • Similar to Interest Rate on the value of a dollar
  • Higher if a company is trustd less or risky
  • Lower if the company is trusted or less risky

Lecture 02-03-06

81
Q

Instrinsic Value of a Company

A

The value of all future dividends that it will be paid.

Infinite sum 1/n^i = FV/

Lecture 02-03-06

82
Q

Book Value of a company.

A

Total assets minus intangible assets and liabilities.

Count Tangible Assets, Ignore intangible assets and subtracy liabilities.

Lecture 02-03-08

83
Q

Market Capitalization

A

Number of shares * price

84
Q

Why does information affects stock price?

A

It could reduce the expected value of dividend which could lead investors to believe that the intrinsic value of a company will go down.

  • Company Specific - Information about the company.
  • Sector Specific - information about companies in the same sector
  • Market Wide information that impact all companies

Lecture 02-03-10

85
Q

Portfolio

A

A weighted set of assets.

Lecture 02-04-02

86
Q

Returns of a portfolio

A

rp(t) = Σiwiri(t)

  • wi : portion of funds in asset i
  • required that Σiabs(wi) = 1.0
  • t = timeframe

Lecture 02-04-03

87
Q

Market Portfolio

A

An index that covers a large set of stocks.

SP500, FTA, TOPIX

Cap Weighted

wi = mktcap i / Σj MarketCapsj

Lecture 02-04-04

88
Q

CAPM

A

Capital Assets Pricing Model

ri(t)=ßi rm (t) + ai(t)

  • ri(t) = Return for an individual stock
  • ßi rm (t) = beta * return on the market for that day
  • ai(t) = plus alpha of that stock on that day
    • CAPM expects this to be 0
89
Q

CAPM vs Active Management

A
  • CAPM (passive) : buy index and hold
    • Says alpha is random and expected value is 0
  • Active : pick individual stocks
    • Believe alpha can be predicted.
90
Q

What is the implication of CAPM

A

Since the efficient markets hypothesis says you cannot predict the markeys, then beta is irrelevant. Since capm relies only on beta, CAPM is stating that you cannot beat the market.

Lecture 02-04-10

91
Q

Arbitrage Pricing Theory

A

Breaking out the beta to compare individual sectors.

92
Q

What is Technical Analysis

A
  • Using historical price and volume
  • Compute statistics called idicators
  • indicators are heuristics.
93
Q

Why might techincal analysis work

A
  • There is information in price.
  • Heuristics work in other AI domains.
94
Q

Where is technical analysis effective

A
  • Individual indicators are weak where as combining them create stronger signals.
  • Look for constrasts.
  • Workse better over shorter time periods.
95
Q

Momentum

A

Direction of change over a period of time.

momentum[t] = price[t] / pricne[t-n] + 1

96
Q

Simple moving average (n-day)

A

Rolling average over N days

SMA[t] = price[t] / price[t-n:t].mean()

97
Q

Bollinger(t) Band - Indicator

A

BB[t] = price[t] - SMA[t] / 2* STD[t]

98
Q

Normalization of indicators

A

normed = values - mean / values.std()