-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstockingPythonQuestion.py
More file actions
107 lines (84 loc) · 5.56 KB
/
stockingPythonQuestion.py
File metadata and controls
107 lines (84 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
High frequency World:
1.
What is stochastic calculus in finance use for:
modeling the random option of an asset price in the black-scholes modeling
Used to model the random motion of an asset price and allow derivative to have a random component determined by a Brownian motion
what is Black Scholes model:
a pricing model use to determine the fair price or theoretical value for a call or a put option based on six variables:
1. Volatility
2. Type of option
3. Underlying stock price
4. Time
5. Strike Pirce
5. risk free rate
Stochastic Oscillator - a momentum indicator that use support and resistance levels
%K = (Price-L5)/(H5-L5) -> L5 is the lowest price in 5 days
The idea behind this indicator is that prices tend to close near the extremes of the recent range before turning points.
The four common type of financial Derivative:
1. Forwards
2. Futures
3. Options
4. Swap - most common type of derivative - agreement to exchange one asset or debt for a similar one
four risks:
1. Nearly impossible to know anyt derivative real value -
2. Leaverage - huge loss if everyone is doing and predicted incorrectly, help cause 2008 housing market
3. Time restriction - unregulated and not sold on exchanges
4. Potential for scams
Market Microstructure
1. Market Structure and Design Issues
Two basis participants - 1. Dealer Markets - using a dealer to serves as intermediary
2. Agency Markets - Broker's brokter who mathes them with other public broker orders
SuperDOT - Electronic order routing system to direct buy and sell orders to a specialist's workstation at the trading post
BBSS(Broker Booth Support System) - receive order on the trading floor
NYSE e-Broker - wireless handheld tool enable floor broker to submmit and manage quotes and order
NYSE Direct+ : High Speed electronic communication system between NYSE member firms and the exchange for institutiional use mostly
2. Price Formation and Price Discovery - prevent large trade to affect markets
The Bernouilli Process-
Expectation -
Options Greeks:
Why buy options?
Speculation - mininal commitment and only need to pay a premium. Calls
Hedging - reduces risk at a reasonable cost. Puts
Spreading - use of two or more options positions
Synthetics - Avoid legal or regulatory reason for owning it. Allow one to gain without "actually" owning the stock
Four Cardinal Coordinates: Holder - people who buy option, Writer - peopel who options
1. Buy Calls - has the right to buy at a certain prices - don't mean they will, they just have the rights, but they will loss their premium of their options
2. Sell Calls - are obligated to sell - have unlimited risk and can lose much more than the price of the options premium
3. Buy Puts - has the right to sell at a certain prices - don't mean they will, they just have the rights, but they will loss their premium of their options
4. Sell Puts - are obligated to buy - have unlimited risk and can lose much more than the price of the options premium
Premium is determined by factors including the stock price, strike price, time remaining until expiration and volatility
for call options:
In the money if the share price is above the strike price
out of the money if the share price is below the strike price
What is the Greeks in Options?
1. Delta - measures the sensitvity of an option's value to a price change in the underlying asset.
Call Option + Put Options -
2. Gamma - measures the rate of change in delta for each one-point increase in the underlying asset
3. Theta - The dollar amount an option loses with each day that passes
Increase near expiration, decrease in and out of the money options
4. Vega - meausres an option's sensitvity to changes in Volatility.
Increase if volativility increase
They all measure the sensentive of price
10 Options Strategies to Know
1. Cover call - purchase the assets outright and simultaneously write a call option on those same assets
2. Married Put - purchase or currently owns a particular assets simultaneously purchases a put option for an equivalent number of shares - insurance policy and establishes a floor should the asset's price plunge dramatically.
3. Bull Call Spread - purchase buy call and sell calls at a higher strike price.
4. Bear Put Spread - reverse of bull call Spread
5. Protective Collar - Purchasing an out of the money put option and writing an out of money call option at the same time - to lock in profits - an advance form for cover call
6. Long Straddle - purchase both call and put option with the same strike price, believing that the stock will move significantly but the direction is unknown
7. Long Strangle - purchase both call and put option with the different strike prices. Less expensive than straddle due to out of money
8. Butterfly Spread - purchase a spread of call or put options
9. Iron Condor - holds a long and short position in two different strangle Strategies
10. Iron Butterfly - don't understand.
Monte Carlo Methods - compute possbility by running actual event and keep track of the result. Find converging points with number of trials. Estimation but powerful technique.
Finite Difference Method -
Probabilities:
P(A) - 1/2
P(B) - 1/2
p(B|A) - 1/3 - the probably of getting A after pick A = P(B and A)/ P(A)
p(A and B) = P(A) * P(B|A)
P(A or B) = P(A) + P(B) - P(A and B)
P(A|B) = P(A and B)/ P(B)
“ The Birthday Problem” (famous) In a roomful of 30 people, what is the probabilit y t hat at
least two people have the same birt hday? Assume birt hdays are uniformly distributed and
there is no leap year complication. (Hint: what is the probability that they all have different birthdays?)