Final Flashcards

1
Q

What is fundamental analysis?

A
Trends based on:
Is price below value
Value of a company
Earnings
Dividends
Cashflows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is fundamental analysis?

A
Trends based on:
Is price below value
Value of a company
Earnings
Dividends
Cashflows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is technical analysis

A

Trends based on:

price or volume (only)

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

What are indicators?

A

Heuristics used for technical analsyis (statistics).

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

Individual indicators are ___

A

weak

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

When is technical analysis effective?

A
  • combinations of indicators
  • contrasts (stock vs market)
  • shorter time periods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the best trading horizon for fundamental factors?

A

—> increasing value when time increases, valuable after years

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

What is the best trading horizon for technical factors?

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

When does decision speed increase?

A

At a smaller trading horizon in technical analysis

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

When does decision complexity increase?

A

At a larger trading horizon in fundamental analysis

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

What is momentum?

A

How much has the price changed over some number of days

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

What is Simple Moving Average

A

Lookback over a window to get a rolling average

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

What are Bollinger Bands

A

Bollinger Bands is a simple moving average divided by standard deviations. It is the SMA with volatility taken into account.

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

How do you calculate Momentum?

A

Momentum = price[t] / price[t - n] - 1.0

Typically -0.5 to 0.5

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

How do you calculate Simple Moving Average?

A

price[t] / [ price.mean (over lookback) ] - 1.0

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

How do you calculate a Bollinger Band

A

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

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

What is a BB sell signal?

A

Price is above the upper band moving in (crossing the upper band)

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

How do you normalize technical indicators?

A

values - mean / std

normalize values between -1 and 1.0

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

How do you normalize technical indicators?

A

values - mean / std

normalize values between -1 and 1.0

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

What is technical analysis

A

Trends based on:

price or volume (only)

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

What are indicators?

A

Heuristics used for technical analsyis (statistics).

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

Individual indicators are ___

A

weak

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

When is technical analysis effective?

A
  • combinations of indicators
  • contrasts (stock vs market)
  • shorter time periods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the best trading horizon for fundamental factors?

A

—> increasing value when time increases, valuable after years

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

How do we adjust the price for dividends?

A

Go back in time on the stock data and subtract dividend payments when they occur.

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

When does decision speed increase?

A

At a smaller trading horizon in technical analysis

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

When does decision complexity increase?

A

At a larger trading horizon in fundamental analysis

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

What is momentum?

A

How much has the price changed over some number of days

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

What is Simple Moving Average

A

Lookback over a window to get a rolling average

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

What are Bollinger Bands

A

Bollinger Bands is a simple moving average divided by standard deviations. It is the SMA with volatility taken into account.

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

How do you calculate Momentum?

A

Momentum = price[t] / price[t - n] - 1.0

Typically -0.5 to 0.5

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

How do you calculate Simple Moving Average?

A

price[t] / [ price.mean (over lookback) ] - 1.0

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

How do you calculate a Bollinger Band

A

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

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

What is the Strong Efficient Markets Hypothesis?

A

Prices reflect all information public and private

  • even insider info can’t be leveraged.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What is a BB buy signal?

A

Price is below the lower band moving in (crossing the lower band)

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

How do you normalize technical indicators?

A

values - mean / std

normalize values between -1 and 1.0

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

What is the finest resolution of data?

A

A tick, a successful buy/sell transaction with volume

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

How is tick data organized?

A

Typically minute by minute or hour by hour.
Contains data including:
open, high, low, close, volume

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

What is Grinold’s Fundamental Law?

A

A fundamental law of active portfolio management.

performance = skill * sqrt( breadth)

IR = IC * sqrt(trading opportunities)

IR - information ratio
IC - information coefficent

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

What is IR?

A

Information Ratio

The Sharpe Ratio of excess returns. The manner in which the portfolio manager is exceeding the market performance.

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

What is adjusted close?

A

A timeline of stock prices adjusted for stock splits. Based on going back over historical data and fixing the splits.

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

Can a single theory relate differing trade strategies?

A

Yes, the fundamental law of active portfolio management

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

How do we adjust the price for dividends?

A

Go back in time on the stock data and subtract dividend payments when they occur.

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

What is survivor bias?

A

Strategy that selects stocks for analysis yesterday based off of success today.

If looking at historic stock data, look at the SP500 or stocks at the historical time

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

What is the Efficient Markets Hypothesis?

A

We cannot exploit assumptions in advance of the market.

  • Large number of investors in market
  • New information arrives randomly
  • Prices adjust quickly
  • Prices reflect all available information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What is breadth?

A

The number of trading opportunities per year?

47
Q

What is the fundamental law, as expressed by richard grinold?

A

IR = IC * sqrt (BR)

perf = skill * rt(breadth)

48
Q

Where does stock information come from?

A
  • price/volume (rapid, quick, everyone can see it)
  • fundamental (quarterly reports, public, root of company value)
  • exogenous (information about the world affecting company, ex. price of oil affects airline)
  • company insiders (ceo knows that company will have success)
49
Q

What are the 3 forms of the Efficient Markets Hypothesis?

A

Weak - future prices cannot be predicted by analyzing historical prices
Semi-strong- prices adjust rapidly to new public information
Strong - prices reflect all information public and private

50
Q

What is the Weak Efficient Markets Hypothesis?

A

Future prices cannot be predicted by analyzing historical prices

  • silent on fundamental analysis or insider info
51
Q

What is the Semi-Strong Efficient Markets Hypothesis?

A

Prices adjust rapidly to new public information

  • silent on insider info
52
Q

What is the Strong Efficient Markets Hypothesis?

A

Prices reflect all information public and private

  • even insider info can’t be leveraged.
53
Q

What does the weak EMH prohibit?

A

technical analysis

54
Q

What does the Semi-Strong EMH prohibit?

A

technical analysis

fundamental analysis

55
Q

What does the Strong EMH prohibit?

A

technical analysis
fundamental analysis
insider info

56
Q

What is the PE ratio?

A

Price to Earnings ratio

57
Q

What is Grinold’s Fundamental Law?

A

A fundamental law of active portfolio management.

performance = skill * sqrt( breadth)

58
Q

What is IR?

A

Information Ratio

The Sharpe Ratio of excess returns. The manner in which the portfolio manager is exceeding the market performance.

59
Q

What are the 3 takeaways from considering risk and reward together

A
  1. Higher alpha generates higher sharpe ratio
  2. More execution opportunities provides higher sharpe ratio
  3. Sharpe ratio grows as the square root of breadth
60
Q

Can a single theory relate differing trade strategies?

A

Yes, the fundamental law of active portfolio management

61
Q

What is IR?

A

Information Ratio:
The information ratio is the mean of all of the alpha components divided by the standard deviation of the alpha components.

IR = Mean (alpha p(t) ) /
Std( alpha p(t))

Is it the Sharpe Ratio of excess return

62
Q

What is the return on the market for a particular day?

A

R(t) = Beta * r(t) + alpha p(t)

Beta * r(t) - market
alpha p(t) - skill
63
Q

What is IC?

A

The correlation of the managers forecasts to actual returns

ranges from 0.0 to 1.0

64
Q

What is breadth?

A

The number of trading opportunities per year?

65
Q

What is the fundamental law, as expressed by richard grinald?

A

IR = IC * sqrt (BR)

66
Q

What is Portfolio Optimization?

A

Mean variance optimization

67
Q

What is risk?

A

Volatility, standard deviation of historical daily returns

68
Q

What is covariance of two stocks?

A

The correlation coefficient of the daily returns of two stocks?

69
Q

When is covariance positive? negative?

A

Positive covariance when elements are correlated, negative covariance when elements are anti-correlated

70
Q

What is Mean Variance Optimization (MVO)?

A

Anti-correlation in the short term, correlation in the long term. Allocating funds in such a way that risks cancel out in the short time

71
Q

What factors does a Mean Variance Optimizer require?

A
Inputs: 
Expected return
volatility
covariance
target return 

Output:
Asset weights for portfolio that minimize risks

72
Q

What are MVO inputs?

A

Expected return
volatility
covariance
target return

73
Q

What are MVO outputs?

A

Asset weight for portfolio that minimzes risks

74
Q

What is the Efficient Frontier?

A

For any particular return level, there is an optimal portfolio (lowest risk for the particular return).

As you reduce the return the curve comes back. Risk eventually increases as you reduce the return.

The efficient frontier is the line of optimal portfolios. There are no portfolios above the efficient frontier but all portfolio’s below the frontier are suboptimal in some way

75
Q

What is the significance of a line from the origin to the efficient frontier?

A

That is the line where the Sharpe Ratio is maximized for the assets

76
Q

What is Reinforcement Learning?

A

A problem, not a solution. Many problems solve the RL problem.

Sense - Think - Act

77
Q

What is Pi(s)

A

The policy that a robot has to determine actions based on states, rewards

78
Q

How do you map a trading problem to RL?

A

Environment: market
State: Features, Holdings
Reward: daily returns
Action: Buy, Sell, Nothing

79
Q

What is a Markov Decision Problem?

A

Set of states S
Set of actions A
Transition function T[s, a, s’]
Reward Function R[s,a]

80
Q

What is the transition function in RL?

A

T[s, a, s’]

3d object. Records the probability of s’ given s and a. The sum of all T[s, a] = 1.0

81
Q

If we have T and R in RL what are the algorithms that can be used?

A

Policy Iteration

Value Iteration

82
Q

What is an experience tuple on RL?

A
83
Q

What is a model-based RL algorithm?

A

Build model of T[s, a, s’] and R[s,a]

Value/Policy Iteration

84
Q

What is a model-free RL algorithm?

A

QLearning.

Develop a policy directly by looking at data

85
Q

What is the function for discounted reward?

A

Sum of i to inf:

gamma ^ (i - 1) * Ri

86
Q

What is Q in QLearner

A

Q[s, a] a function or table. Q is the value of an action.

Q[s, a] = immediate reward + discounted reward

87
Q

How do you use Q in QLearner?

A

Use Q to determine the policy of which action to take given a specific state.

Policy (Pi) of S = argmax of a ( Q[s, a] )

88
Q

What is the big picture QLEarning procedure?

A
  1. Select training data
  2. Iterate over time
  3. Test Policy Pi
  4. Repeat until Converged
89
Q

What are the details of the QLearning procedure?

A
  1. Set startime, init Q[]
  2. Compute S
  3. Select A
  4. Observe R, S’
  5. Update Q
90
Q

What is the update rule for QLearner?

A

Q’[S, A] = (1 - alpha)Q[s,a] + alpha*ImprovedEstimate

Q’[S,A] = (1 - alpha)Q[S,A] + alpha ( R + gamma * laterRewards)

Q’[S,A] = (1 - alpha)Q[S,A] + alpha (r + gamma * Q[S’, ArgMaxA’(Q[S’,A’]) ]

91
Q

What is gamma?

A

The Discount Factor used to progressively reduce the value of future rewards.
Between 0 and 1

92
Q

What is alpha?

A

The Learning Rate used to vary the weight given to a new experience compared to past Q-values.
Between 0 and 1

93
Q

What is ArgMax A’ ( Q[S’,A’] )

A

The action that maximizes the Q-value among all possible actions a’ from s’

94
Q

How is QLearning made successful? How is this accomplished?

A

QLearning success is dependent on exploration.

This is accomplished by randomizing action selection. Choose random actions frequently in the beginning and reduce the randomness as you go.

95
Q

What are the actions for the QLearner in trading?

A

Buy
Sell
Do Nothing

96
Q

How do you discretize a number?

A
Stepsize = side (data) / steps
data.sort()
for in in range (0, steps)
{
threshold[i] = data[(i+1) * stepsize]
}
97
Q

What is the advantage of QLearning compared to Model methods of RL?

A

It can be applied to domains where all states and/or transitions are not fully defined

98
Q

What is the Dyna process?

A

Learn Model T, R
Hallucinate Experience
Update Q

99
Q

How do we hallucinate an experience with dyna?

A
s = random
a = random 
s' = infer from T[]
r = R[s,a]
100
Q

How do we update our model using Dyna?

A

Generate T’[S, A, S’]

R’[S,A]

101
Q

How do you Learn T for Dyna?

A

T[S,A,S’] = Prob S, A -> S

init Tc [] = 0.00001
While executing, observe S, A, S’
increment Tc[S,A,S’]

102
Q

How do we evalute T for Dyna?

A

T[S,A,S’] = Tc[S,A,S’] / sum Tc[S,A] (all S’)

103
Q

How do you learn R for Dyna?

A
R[S,A] = Expected reward fo s,a
r = immediate reward
R'[S,A] = (1 - alpha) *R[S,A] + alpha  * r
104
Q

What is the entire Dyna Q process?

A
(QLearn)
Init Q Table
Observe S 
Execute A, Observe S',r
Update Q with 
(Dyna)
T'[S,A,S'] update
R'[S,A] update
(repeat)
S = random
A = random
S' = infer from T[]
r = R[S,A]
update Q with
105
Q

How do you validate a time-series model like a ML trade strategy?

A

Backtest to validate the model using:
Roll Forward Cross Validation

You can’t slice time randomly. The future predicts the past.

106
Q

What is in sample backtesting?

A

Back testing over the same data you used to train your model.

The method is doomed to succeed.

107
Q

How do you avoid in sample backtesting?

A

Build safeguards and procedures to prevent testing over the same data you train over. ie. train over 2007, test over 2008

108
Q

What is survivor bias?

A

Selective use of data in a statistical study that emphasizes examples that are alive at the end of the study.

109
Q

How do you prevent survivor bias?

A

Use historic index membership
Pair with SBF-free data
Use these indices as your universe for testing

110
Q

What is market impact?

A

The act of trading affects price. Historical data does not include your trades and is therefore not an accurate representation of the price you would get

111
Q

How do you ignore market impact on ML strategy?

A

Include a “slippage” or “market impact” model in backtests

112
Q

What is a basket indicator?

A

An indicator that looks for divergence between stock and index

113
Q

What is the Relative Strength Index?

A

An oscillatory indicator. On days the stock goes up how much does it go up on days the stock goes down how much does it go down.
0 to 100 scale. Under 30 oversold, over 70 over bought

114
Q

What is the basket strategy?

When to go long? short? close?

A
Long: 
- symbol is oversold, index is not
Short: 
- symbol is overbought, index is not
Close: 
- symbol crosses through SMA

Divergence strategy