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
How do we adjust the price for dividends?
Go back in time on the stock data and subtract dividend payments when they occur.
26
When does decision speed increase?
At a smaller trading horizon in technical analysis
27
When does decision complexity increase?
At a larger trading horizon in fundamental analysis
28
What is momentum?
How much has the price changed over some number of days
29
What is Simple Moving Average
Lookback over a window to get a rolling average
30
What are Bollinger Bands
Bollinger Bands is a simple moving average divided by standard deviations. It is the SMA with volatility taken into account.
31
How do you calculate Momentum?
Momentum = price[t] / price[t - n] - 1.0 Typically -0.5 to 0.5
32
How do you calculate Simple Moving Average?
price[t] / [ price.mean (over lookback) ] - 1.0
33
How do you calculate a Bollinger Band
BB = price[t] - SMA[t] / 2 * std
34
What is the Strong Efficient Markets Hypothesis?
Prices reflect all information public and private - even insider info can't be leveraged.
35
What is a BB buy signal?
Price is below the lower band moving in (crossing the lower band)
36
How do you normalize technical indicators?
values - mean / std normalize values between -1 and 1.0
37
What is the finest resolution of data?
A tick, a successful buy/sell transaction with volume
38
How is tick data organized?
Typically minute by minute or hour by hour. Contains data including: open, high, low, close, volume
39
What is Grinold's Fundamental Law?
A fundamental law of active portfolio management. performance = skill * sqrt( breadth) IR = IC * sqrt(trading opportunities) IR - information ratio IC - information coefficent
40
What is IR?
Information Ratio | The Sharpe Ratio of excess returns. The manner in which the portfolio manager is exceeding the market performance.
41
What is adjusted close?
A timeline of stock prices adjusted for stock splits. Based on going back over historical data and fixing the splits.
42
Can a single theory relate differing trade strategies?
Yes, the fundamental law of active portfolio management
43
How do we adjust the price for dividends?
Go back in time on the stock data and subtract dividend payments when they occur.
44
What is survivor bias?
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
45
What is the Efficient Markets Hypothesis?
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
46
What is breadth?
The number of trading opportunities per year?
47
What is the fundamental law, as expressed by richard grinold?
IR = IC * sqrt (BR) perf = skill * rt(breadth)
48
Where does stock information come from?
- 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
What are the 3 forms of the Efficient Markets Hypothesis?
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
What is the Weak Efficient Markets Hypothesis?
Future prices cannot be predicted by analyzing historical prices - silent on fundamental analysis or insider info
51
What is the Semi-Strong Efficient Markets Hypothesis?
Prices adjust rapidly to new public information - silent on insider info
52
What is the Strong Efficient Markets Hypothesis?
Prices reflect all information public and private - even insider info can't be leveraged.
53
What does the weak EMH prohibit?
technical analysis
54
What does the Semi-Strong EMH prohibit?
technical analysis | fundamental analysis
55
What does the Strong EMH prohibit?
technical analysis fundamental analysis insider info
56
What is the PE ratio?
Price to Earnings ratio
57
What is Grinold's Fundamental Law?
A fundamental law of active portfolio management. performance = skill * sqrt( breadth)
58
What is IR?
Information Ratio | The Sharpe Ratio of excess returns. The manner in which the portfolio manager is exceeding the market performance.
59
What are the 3 takeaways from considering risk and reward together
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
Can a single theory relate differing trade strategies?
Yes, the fundamental law of active portfolio management
61
What is IR?
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
What is the return on the market for a particular day?
R(t) = Beta * r(t) + alpha p(t) ``` Beta * r(t) - market alpha p(t) - skill ```
63
What is IC?
The correlation of the managers forecasts to actual returns ranges from 0.0 to 1.0
64
What is breadth?
The number of trading opportunities per year?
65
What is the fundamental law, as expressed by richard grinald?
IR = IC * sqrt (BR)
66
What is Portfolio Optimization?
Mean variance optimization
67
What is risk?
Volatility, standard deviation of historical daily returns
68
What is covariance of two stocks?
The correlation coefficient of the daily returns of two stocks?
69
When is covariance positive? negative?
Positive covariance when elements are correlated, negative covariance when elements are anti-correlated
70
What is Mean Variance Optimization (MVO)?
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
What factors does a Mean Variance Optimizer require?
``` Inputs: Expected return volatility covariance target return ``` Output: Asset weights for portfolio that minimize risks
72
What are MVO inputs?
Expected return volatility covariance target return
73
What are MVO outputs?
Asset weight for portfolio that minimzes risks
74
What is the Efficient Frontier?
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
What is the significance of a line from the origin to the efficient frontier?
That is the line where the Sharpe Ratio is maximized for the assets
76
What is Reinforcement Learning?
A problem, not a solution. Many problems solve the RL problem. Sense - Think - Act
77
What is Pi(s)
The policy that a robot has to determine actions based on states, rewards
78
How do you map a trading problem to RL?
Environment: market State: Features, Holdings Reward: daily returns Action: Buy, Sell, Nothing
79
What is a Markov Decision Problem?
Set of states S Set of actions A Transition function T[s, a, s'] Reward Function R[s,a]
80
What is the transition function in RL?
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
If we have T and R in RL what are the algorithms that can be used?
Policy Iteration | Value Iteration
82
What is an experience tuple on RL?
83
What is a model-based RL algorithm?
Build model of T[s, a, s'] and R[s,a] | Value/Policy Iteration
84
What is a model-free RL algorithm?
QLearning. | Develop a policy directly by looking at data
85
What is the function for discounted reward?
Sum of i to inf: | gamma ^ (i - 1) * Ri
86
What is Q in QLearner
Q[s, a] a function or table. Q is the value of an action. Q[s, a] = immediate reward + discounted reward
87
How do you use Q in QLearner?
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
What is the big picture QLEarning procedure?
1. Select training data 2. Iterate over time 3. Test Policy Pi 4. Repeat until Converged
89
What are the details of the QLearning procedure?
1. Set startime, init Q[] 2. Compute S 3. Select A 4. Observe R, S' 5. Update Q
90
What is the update rule for QLearner?
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
What is gamma?
The Discount Factor used to progressively reduce the value of future rewards. Between 0 and 1
92
What is alpha?
The Learning Rate used to vary the weight given to a new experience compared to past Q-values. Between 0 and 1
93
What is ArgMax A' ( Q[S',A'] )
The action that maximizes the Q-value among all possible actions a' from s'
94
How is QLearning made successful? How is this accomplished?
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
What are the actions for the QLearner in trading?
Buy Sell Do Nothing
96
How do you discretize a number?
``` Stepsize = side (data) / steps data.sort() for in in range (0, steps) { threshold[i] = data[(i+1) * stepsize] } ```
97
What is the advantage of QLearning compared to Model methods of RL?
It can be applied to domains where all states and/or transitions are not fully defined
98
What is the Dyna process?
Learn Model T, R Hallucinate Experience Update Q
99
How do we hallucinate an experience with dyna?
``` s = random a = random s' = infer from T[] r = R[s,a] ```
100
How do we update our model using Dyna?
Generate T'[S, A, S'] | R'[S,A]
101
How do you Learn T for Dyna?
T[S,A,S'] = Prob S, A -> S init Tc [] = 0.00001 While executing, observe S, A, S' increment Tc[S,A,S']
102
How do we evalute T for Dyna?
T[S,A,S'] = Tc[S,A,S'] / sum Tc[S,A] (all S')
103
How do you learn R for Dyna?
``` R[S,A] = Expected reward fo s,a r = immediate reward R'[S,A] = (1 - alpha) *R[S,A] + alpha * r ```
104
What is the entire Dyna Q process?
``` (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
How do you validate a time-series model like a ML trade strategy?
Backtest to validate the model using: Roll Forward Cross Validation You can't slice time randomly. The future predicts the past.
106
What is in sample backtesting?
Back testing over the same data you used to train your model. The method is doomed to succeed.
107
How do you avoid in sample backtesting?
Build safeguards and procedures to prevent testing over the same data you train over. ie. train over 2007, test over 2008
108
What is survivor bias?
Selective use of data in a statistical study that emphasizes examples that are alive at the end of the study.
109
How do you prevent survivor bias?
Use historic index membership Pair with SBF-free data Use these indices as your universe for testing
110
What is market impact?
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
How do you ignore market impact on ML strategy?
Include a "slippage" or "market impact" model in backtests
112
What is a basket indicator?
An indicator that looks for divergence between stock and index
113
What is the Relative Strength Index?
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
What is the basket strategy? | When to go long? short? close?
``` Long: - symbol is oversold, index is not Short: - symbol is overbought, index is not Close: - symbol crosses through SMA ``` Divergence strategy