my-markdown-library 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/F24LS_md/ Lecture 4 - Public.md +347 -0
  3. data/F24LS_md/Lecture 1 - Introduction and Overview.md +327 -0
  4. data/F24LS_md/Lecture 10 - Development_.md +631 -0
  5. data/F24LS_md/Lecture 11 - Econometrics.md +345 -0
  6. data/F24LS_md/Lecture 12 - Finance.md +692 -0
  7. data/F24LS_md/Lecture 13 - Environmental Economics.md +299 -0
  8. data/F24LS_md/Lecture 15 - Conclusion.md +272 -0
  9. data/F24LS_md/Lecture 2 - Demand.md +349 -0
  10. data/F24LS_md/Lecture 3 - Supply.md +329 -0
  11. data/F24LS_md/Lecture 5 - Production C-D.md +291 -0
  12. data/F24LS_md/Lecture 6 - Utility and Latex.md +440 -0
  13. data/F24LS_md/Lecture 7 - Inequality.md +607 -0
  14. data/F24LS_md/Lecture 8 - Macroeconomics.md +704 -0
  15. data/F24LS_md/Lecture 8 - Macro.md +700 -0
  16. data/F24LS_md/Lecture 9 - Game Theory_.md +436 -0
  17. data/F24LS_md/summary.yaml +105 -0
  18. data/F24Lec_MD/LecNB_summary.yaml +206 -0
  19. data/F24Lec_MD/lec01/lec01.md +267 -0
  20. data/F24Lec_MD/lec02/Avocados_demand.md +425 -0
  21. data/F24Lec_MD/lec02/Demand_Steps_24.md +126 -0
  22. data/F24Lec_MD/lec02/PriceElasticity.md +83 -0
  23. data/F24Lec_MD/lec02/ScannerData_Beer.md +171 -0
  24. data/F24Lec_MD/lec02/demand-curve-Fa24.md +213 -0
  25. data/F24Lec_MD/lec03/3.0-CubicCostCurve.md +239 -0
  26. data/F24Lec_MD/lec03/3.1-Supply.md +274 -0
  27. data/F24Lec_MD/lec03/3.2-sympy.md +332 -0
  28. data/F24Lec_MD/lec03/3.3a-california-energy.md +120 -0
  29. data/F24Lec_MD/lec03/3.3b-a-really-hot-tuesday.md +121 -0
  30. data/F24Lec_MD/lec04/lec04-CSfromSurvey-closed.md +335 -0
  31. data/F24Lec_MD/lec04/lec04-CSfromSurvey.md +331 -0
  32. data/F24Lec_MD/lec04/lec04-Supply-Demand-closed.md +519 -0
  33. data/F24Lec_MD/lec04/lec04-Supply-Demand.md +514 -0
  34. data/F24Lec_MD/lec04/lec04-four-plot-24.md +34 -0
  35. data/F24Lec_MD/lec04/lec04-four-plot.md +34 -0
  36. data/F24Lec_MD/lec05/Lec5-Cobb-Douglas.md +131 -0
  37. data/F24Lec_MD/lec05/Lec5-CobbD-AER1928.md +283 -0
  38. data/F24Lec_MD/lec06/6.1-Sympy-Differentiation.md +253 -0
  39. data/F24Lec_MD/lec06/6.2-3D-utility.md +287 -0
  40. data/F24Lec_MD/lec06/6.3-QuantEcon-Optimization.md +399 -0
  41. data/F24Lec_MD/lec06/6.4-latex.md +138 -0
  42. data/F24Lec_MD/lec06/6.5-Edgeworth.md +269 -0
  43. data/F24Lec_MD/lec07/7.1-inequality.md +283 -0
  44. data/F24Lec_MD/lec07/7.2-historical-inequality.md +237 -0
  45. data/F24Lec_MD/lec08/macro-fred-api.md +313 -0
  46. data/F24Lec_MD/lec09/lecNB-prisoners-dilemma.md +88 -0
  47. data/F24Lec_MD/lec10/Lec10.2-waterguard.md +401 -0
  48. data/F24Lec_MD/lec10/lec10.1-mapping.md +199 -0
  49. data/F24Lec_MD/lec11/11.1-slr.md +305 -0
  50. data/F24Lec_MD/lec11/11.2-mlr.md +171 -0
  51. data/F24Lec_MD/lec12/Lec12-4-PersonalFinance.md +590 -0
  52. data/F24Lec_MD/lec12/lec12-1_Interest_Payments.md +267 -0
  53. data/F24Lec_MD/lec12/lec12-2-stocks-options.md +235 -0
  54. data/F24Lec_MD/lec13/Co2_ClimateChange.md +139 -0
  55. data/F24Lec_MD/lec13/ConstructingMAC.md +213 -0
  56. data/F24Lec_MD/lec13/EmissionsTracker.md +170 -0
  57. data/F24Lec_MD/lec13/KuznetsHypothesis.md +219 -0
  58. data/F24Lec_MD/lec13/RoslingPlots.md +217 -0
  59. data/F24Lec_MD/lec15/vibecession.md +485 -0
  60. data/F24Textbook_MD/00-intro/index.md +292 -0
  61. data/F24Textbook_MD/01-demand/01-demand.md +152 -0
  62. data/F24Textbook_MD/01-demand/02-example.md +131 -0
  63. data/F24Textbook_MD/01-demand/03-log-log.md +284 -0
  64. data/F24Textbook_MD/01-demand/04-elasticity.md +248 -0
  65. data/F24Textbook_MD/01-demand/index.md +15 -0
  66. data/F24Textbook_MD/02-supply/01-supply.md +203 -0
  67. data/F24Textbook_MD/02-supply/02-eep147-example.md +86 -0
  68. data/F24Textbook_MD/02-supply/03-sympy.md +138 -0
  69. data/F24Textbook_MD/02-supply/04-market-equilibria.md +204 -0
  70. data/F24Textbook_MD/02-supply/index.md +16 -0
  71. data/F24Textbook_MD/03-public/govt-intervention.md +73 -0
  72. data/F24Textbook_MD/03-public/index.md +10 -0
  73. data/F24Textbook_MD/03-public/surplus.md +351 -0
  74. data/F24Textbook_MD/03-public/taxes-subsidies.md +282 -0
  75. data/F24Textbook_MD/04-production/index.md +15 -0
  76. data/F24Textbook_MD/04-production/production.md +178 -0
  77. data/F24Textbook_MD/04-production/shifts.md +296 -0
  78. data/F24Textbook_MD/05-utility/budget-constraints.md +166 -0
  79. data/F24Textbook_MD/05-utility/index.md +15 -0
  80. data/F24Textbook_MD/05-utility/utility.md +136 -0
  81. data/F24Textbook_MD/06-inequality/historical-inequality.md +253 -0
  82. data/F24Textbook_MD/06-inequality/index.md +15 -0
  83. data/F24Textbook_MD/06-inequality/inequality.md +226 -0
  84. data/F24Textbook_MD/07-game-theory/bertrand.md +257 -0
  85. data/F24Textbook_MD/07-game-theory/cournot.md +333 -0
  86. data/F24Textbook_MD/07-game-theory/equilibria-oligopolies.md +96 -0
  87. data/F24Textbook_MD/07-game-theory/expected-utility.md +61 -0
  88. data/F24Textbook_MD/07-game-theory/index.md +19 -0
  89. data/F24Textbook_MD/07-game-theory/python-classes.md +340 -0
  90. data/F24Textbook_MD/08-development/index.md +35 -0
  91. data/F24Textbook_MD/09-macro/CentralBanks.md +101 -0
  92. data/F24Textbook_MD/09-macro/Indicators.md +77 -0
  93. data/F24Textbook_MD/09-macro/fiscal_policy.md +36 -0
  94. data/F24Textbook_MD/09-macro/index.md +14 -0
  95. data/F24Textbook_MD/09-macro/is_curve.md +76 -0
  96. data/F24Textbook_MD/09-macro/phillips_curve.md +70 -0
  97. data/F24Textbook_MD/10-finance/index.md +10 -0
  98. data/F24Textbook_MD/10-finance/options.md +178 -0
  99. data/F24Textbook_MD/10-finance/value-interest.md +60 -0
  100. data/F24Textbook_MD/11-econometrics/index.md +16 -0
  101. data/F24Textbook_MD/11-econometrics/multivariable.md +218 -0
  102. data/F24Textbook_MD/11-econometrics/reading-econ-papers.md +25 -0
  103. data/F24Textbook_MD/11-econometrics/single-variable.md +483 -0
  104. data/F24Textbook_MD/11-econometrics/statsmodels.md +58 -0
  105. data/F24Textbook_MD/12-environmental/KuznetsHypothesis-Copy1.md +187 -0
  106. data/F24Textbook_MD/12-environmental/KuznetsHypothesis.md +187 -0
  107. data/F24Textbook_MD/12-environmental/MAC.md +254 -0
  108. data/F24Textbook_MD/12-environmental/index.md +36 -0
  109. data/F24Textbook_MD/LICENSE.md +11 -0
  110. data/F24Textbook_MD/intro.md +26 -0
  111. data/F24Textbook_MD/references.md +25 -0
  112. data/F24Textbook_MD/summary.yaml +414 -0
  113. metadata +155 -0
@@ -0,0 +1,692 @@
1
+ ---
2
+ title: "Lecture 12 - Finance"
3
+ type: slides
4
+ week: 12
5
+ source_path: "/Users/ericvandusen/Documents/Data88E-ForTraining/F24LS/Lecture 12 - Finance.pptx"
6
+ ---
7
+
8
+ ## Slide 1: Lecture 12: Finance
9
+
10
+ - Lecture 12: Finance
11
+ - Data 88E: Economic Models
12
+
13
+ ## Slide 2: Announcements
14
+
15
+ - Lab will come out later today
16
+ - Lab next week for environmental
17
+
18
+ ## Slide 3: Today’s class
19
+
20
+ - Back to Facebook Transparency ( more ranting)
21
+ - Personal Finance and Data Science
22
+ - Evolution of Data Intensive Apps
23
+ - Time Value of Money - Interest rates - NB
24
+ - Options - puts and calls
25
+ - Stocks Indices & Returns - NB
26
+ - Pulling in data from an API - Yahoo finance
27
+ - Using Pandas to graph
28
+
29
+ ## Slide 4: Fake pro-Harris Group runs false ads in Swing States
30
+
31
+ ## Slide 5: Meta Ad Library
32
+
33
+ ## Slide 6: Ad testing phase
34
+
35
+ ## Slide 7: The ads link to a fake website with a fake agenda
36
+
37
+ ## Slide 8: (untitled)
38
+
39
+ - Fake Pro-Harris group - Youtube ads to Muslims
40
+
41
+ ## Slide 9: Meme for the day - Nov 22,2023 - Powerball was at 1.9bn
42
+
43
+ - Expected Value! EV = X \* P(x)
44
+ - Cost of Lottery Ticket =2$
45
+ - Odds of winning are 1 in 292.200,000
46
+ - Net lump sum payout net of taxes = 706,000,000
47
+ - EV = $706m/292m = $2.41 > $2 cost
48
+ - Potentially for the first time ever …
49
+
50
+ ## Slide 10: Financial Economics and Data
51
+
52
+ - Finance - markets where money is on both sides of the exchange
53
+ - Decision theory applied to investment decisions
54
+ - Allocation across space and across time
55
+ - Asset Pricing - Investment decisions
56
+ - Corporate Finance - allocations of capital, structures of corporations
57
+ - “Present Value” - allocation over time periods
58
+ - “Expected Value” - allocation across uncertain outcomes
59
+
60
+ ## Slide 11: Personal Finance and Data Science
61
+
62
+ - Saving and Investing - more options available to more people than ever before
63
+ - Rapid evolution & innovation of how consumers relate to markets
64
+ - On their mobile devices and appears to be free!
65
+ - How do we actually pay for these innovations?
66
+
67
+ ## Slide 12: Cash Apps
68
+
69
+ - https://www.businessofapps.com/data/venmo-statistics/
70
+
71
+ ## Slide 13: How does Venmo make money?
72
+
73
+ - 3% Merchant Fee on transactions - just like credit cards
74
+ - But….
75
+ - https://www.businessofapps.com/data/venmo-statistics/
76
+
77
+ ## Slide 14: They do hold 35bn in Customer Funds!
78
+
79
+ - Venmo & Paypal balances
80
+ - “Funds Receivable & Customer Accounts”
81
+ - https://s201.q4cdn.com/231198771/files/doc\_financials/2022/q3/PYPL-Q3-22-Earnings-Release.pdf
82
+
83
+ ## Slide 15: Robinhood - growth of micro-investing
84
+
85
+ - https://www.businessofapps.com/data/robinhood-statistics/
86
+
87
+ ## Slide 16: Robinhood in Mid- April
88
+
89
+ - https://www.divergentplanning.com/blog/the-tax-consequences-of-your-kids-trading-on-robinhood
90
+
91
+ ## Slide 17: How does Robinhood make money?
92
+
93
+ - Payments for Order Flow - PFOF
94
+ - Retail brokerage gets a payment / commission for directing orders to market makers
95
+ - Market Makers and Dark Pools
96
+ - Huge unregulated pools of trades, within hedge funds, off markets
97
+ - Aggregated across users
98
+ - Spread between buy and sell
99
+ - Can be fractions of a cent on huge volumes
100
+ - Retail investor sees free trading,
101
+ - But doesnt know how close prices is to trading price
102
+
103
+ ## Slide 18: Dark Pools and Algorithmic Trading
104
+
105
+ - Huge Market Making pools of trades
106
+ - High Frequency trading - front running markets by thousandths of a second
107
+ - Algo Wars - planting hundreds of fake trades to conceal the trades that you are actually going to make
108
+
109
+ ## Slide 19: Algorithmic Trading - is there a retail Python via API version?
110
+
111
+ - Alpaca API - make apps!
112
+ - Algo trade from Jupyter
113
+
114
+ ## Slide 20: Goldfish on Alpaca beats wallstreetbets
115
+
116
+ - Python trading on Alpaca
117
+ - Sentiment analysis on Wallstreetbets
118
+ - Train the data via a website
119
+ - Michael Reeves 10m views
120
+
121
+ ## Slide 21: Financial Economics
122
+
123
+ - Share prices, interest rates, exchange rates
124
+ - “ where money is on both sides of a trade” - instead of goods and services
125
+ - Decision Making under uncertainty! - Expected Present Value
126
+ - Time
127
+ - Risk
128
+ - Value of a strategy in comparison to a risk free return
129
+ - Build models to value financial instruments - Mathematical Models
130
+ - Validate models using data - Financial Econometrics
131
+ - Build trading models based on model - Quantitative Trading
132
+
133
+ ## Slide 22: How do we think about interest rates?
134
+
135
+ - Government Finance - a macroeconomic variable that can be used for policy
136
+ - Government setting interest rates to stimulate/slow economic growth
137
+ - But - interest rates are also set in the market place - and reflect decisions
138
+ - Time preference - how much would you be indifferent to having $ now vs money in the future - discounting the future
139
+ - 5 % interest - $100 today would be worth $105 in one year
140
+ - We can think about this in terms of a Loan - cost to borrow
141
+ - Savings - payment for savings
142
+ - But it can be embedded in a whole range of financial arrangements
143
+
144
+ ## Slide 23: Money has time value
145
+
146
+ - Would you rather have $100 now or later?
147
+ - Interest Rate, r
148
+ - 5% interest rate => r= 0.05
149
+ - A deposit of $100 at bank 1 has a future value of $110.25 in 2 years.
150
+
151
+ <details><summary>Speaker notes</summary>
152
+
153
+ Continuous compounding -> the more frequent you compound the greater this interest accumulates
154
+
155
+ </details>
156
+
157
+ ## Slide 24: Making a formula
158
+
159
+ - n= Number of times per year
160
+ - T = year
161
+ - Nt = number of times in a given that interest is paid
162
+ - How frequency you compound the greater the interest rate
163
+ - ( the faster it grows)
164
+
165
+ ## Slide 25: Time Value of Money
166
+
167
+ - Future Value
168
+ - Present Value
169
+ - Discount Factor
170
+ - Present Value of an asset is the future value of the asset times a discount factor
171
+
172
+ ## Slide 26: How does this play out as a consumer?
173
+
174
+ - Mortgage payment n=360 r=.03
175
+ - Student Loans n=120 r=.025
176
+ - Car Loans n=60 r=.04
177
+ - Credit Cards n=?? r=.16
178
+ - A = Amortized Payment
179
+ - P=Principal
180
+ - r=interest rate as a decimal
181
+ - n= number of time periods
182
+
183
+ ## Slide 27: Present Value and the value of a Bond
184
+
185
+ - F = face value
186
+ - iF = contractual interest rate
187
+ - C = F \* iF = coupon payment (periodic interest payment)
188
+ - N = number of payments
189
+ - i = market interest rate, or required yield, or observed / appropriate yield to maturity (see below)
190
+ - M = value at maturity, usually equals face value
191
+ - P = market price of bond.
192
+
193
+ ## Slide 28: There are many types of bonds
194
+
195
+ - Treasury Bonds
196
+ - Savings Bonds
197
+ - Agency Bonds
198
+ - Municipal Bonds
199
+ - Corporate Bonds
200
+
201
+ ## Slide 29: Jump to Notebook on programming interest rates
202
+
203
+ ## Slide 30: (untitled)
204
+
205
+ ## Slide 31: (untitled)
206
+
207
+ ## Slide 32: (untitled)
208
+
209
+ ## Slide 33: (untitled)
210
+
211
+ ## Slide 34: Personal Finance
212
+
213
+ ## Slide 35: Bonus: Taxes in the U.S.
214
+
215
+ - Source: https://archive.nytimes.com/www.nytimes.com/imagepages/2012/04/13/opinion/sunday/0415web-leonhardt2.html
216
+
217
+ ## Slide 36: Personal Finance: Disclaimer
218
+
219
+ - I have no qualifications (ex. CFP, CPA) in finance or personal finance. This information is just based on my experience and knowledge I have picked up formally (ex. through undergraduate education) and informally. This is not financial advice, but instead an overview to get you interested in the subject!
220
+
221
+ ## Slide 37: Personal Finance: Priorities
222
+
223
+ - Savings rate
224
+ - Stock/bond split
225
+ - Portfolio allocation
226
+ - Fees
227
+ - Taxes
228
+
229
+ ## Slide 38: Personal Finance: Savings Rate
230
+
231
+ - How much you save (and when you start saving) will have the largest impact on your long-term finances
232
+
233
+ ## Slide 39: Personal Finance: Stock/Bond Split
234
+
235
+ - Stocks: generally riskier, but with higher returns on average
236
+ - Bonds: generally safer, but with lower returns on average
237
+
238
+ ## Slide 40: Personal Finance: Stock/Bond Split
239
+
240
+ ## Slide 41: Personal Finance: Stock/Bond Split
241
+
242
+ ## Slide 42: Personal Finance: Portfolio Allocation
243
+
244
+ - You’ve figured out your stock/bond split, but what stocks should you buy? Financial advisors generally suggest a well-diversified set of stocks, which can be easily achieved through ETFs, index funds, or mutual funds. But which ones?
245
+ - Pay attention to:
246
+ - Diversification
247
+ - Fees
248
+ - Active vs. passive management (active management is BAD)
249
+ - Do NOT pay attention to:
250
+ - Past returns
251
+
252
+ ## Slide 43: Personal Finance: Portfolio Allocation
253
+
254
+ ## Slide 44: Personal Finance: Portfolio Allocation
255
+
256
+ ## Slide 45: Personal Finance: Portfolio Allocation
257
+
258
+ ## Slide 46: Personal Finance: Portfolio Allocation
259
+
260
+ ## Slide 47: Personal Finance: Portfolio Allocation
261
+
262
+ - Source: https://www.schwab.com/learn/story/schwabs-long-term-capital-market-expectations
263
+
264
+ ## Slide 48: Personal Finance: Portfolio Allocation
265
+
266
+ ## Slide 49: Personal Finance: Want to learn more?
267
+
268
+ - There’s way more to personal finance:
269
+ - Taxes (huge)
270
+ - Retirement accounts: 401k, IRA, roth vs. traditional, etc.
271
+ - Credit scores
272
+ - Debt
273
+ - Renting/leasing vs. buying
274
+ - Insurance
275
+ - Career choice
276
+ - Etc.
277
+ - Take UGBA 135—my \#1 class recommendation for UC Berkeley students!
278
+ - There is UGBA 235 for master’s students
279
+
280
+ ## Slide 50: Notebook on Personal Finance
281
+
282
+ - And how to make widgets
283
+
284
+ ## Slide 51: Price of a Stock?
285
+
286
+ - Its just defined by the last time a stock changed hands
287
+ - This could be millions of times per day
288
+
289
+ ## Slide 52: Gamestop story
290
+
291
+ ## Slide 53: Indexes
292
+
293
+ - An index is composite measure of an index composed of a set of stocks
294
+ - Dow Jones Index - a select few representative stocks
295
+ - Calculation was costly
296
+ - SP 500 - the 500 biggest stocks
297
+ - weighted average, indexed to particular time period
298
+ - Nasdaq - almost all stocks listed
299
+
300
+ ## Slide 54: S&P 500 on Yahoo Finance
301
+
302
+ ## Slide 55: Long and Short
303
+
304
+ - Finance jargons explained:
305
+ - Long ≈ Buy
306
+ - Short ≈ Sell
307
+ - So,
308
+ - Long a stock means buy a stock
309
+ - Short a stock means sell a stock
310
+
311
+ ## Slide 56: More about Short
312
+
313
+ - But shorting a stock doesn’t mean you need to own the stock beforehand…
314
+
315
+ ## Slide 57: More about Short
316
+
317
+ - But shorting a stock doesn’t mean you need to own the stock beforehand…
318
+ - Imagine if you think the stock price is going down tomorrow
319
+
320
+ ## Slide 58: More about Short
321
+
322
+ - But shorting a stock doesn’t mean you need to own the stock beforehand…
323
+ - Imagine if you think the stock price is going down tomorrow
324
+ - Now (Stock price = $100): Borrow a share from a broker - sell it - get $100
325
+ - Tomorrow (Stock price = $70):If stock goes down over a year $70 - buy it back for $70
326
+ - Give the share back to the broker Made $100 - $70 = $30
327
+ - “Short” - borrow/sell now ~ later buy/give back
328
+ - ( and you have to pay some interest on borrowing that stock for 1 year)
329
+ - ( and how much collateral do you have to put down)
330
+
331
+ ## Slide 59: More about Short
332
+
333
+ - But shorting a stock doesn’t mean you need to own the stock beforehand…
334
+ - Imagine if you think the stock price is going down tomorrow
335
+ - Now (Stock price = $100): Borrow a share from a broker - sell it - get $100
336
+ - Tomorrow (Stock price = $70):If stock goes down over a year $70 - buy it back for $70
337
+ - Give the share back to the broker Made $100 - $70 = $30
338
+ - “Short” - borrow/sell now ~ later buy/give back
339
+ - ( and you have to pay some interest on borrowing that stock for 1 year)
340
+ - ( and how much collateral do you have to put down)
341
+ - You are shorting $100 of this stock at this moment
342
+
343
+ ## Slide 60: Stocks Options
344
+
345
+ - Stocks: Ownership in the company
346
+ - Price: The price of the stock was last traded for
347
+ - Long Position: The party that has agreed to buy the underlying in the future
348
+ - Short Position: The party that has agreed to sell the underlying stock in the future
349
+
350
+ <details><summary>Speaker notes</summary>
351
+
352
+ Stock Price: the price of the last trade / liquid
353
+
354
+ </details>
355
+
356
+ ## Slide 61: Futures
357
+
358
+ - The 125th Big Game is around the corner (Nov 19th)! You want to buy a ticket from a “certified” reseller, but you will only have enough cash to pay for a ticket next week. The reseller told you that the ticket price is very volatile.
359
+
360
+ ## Slide 62: Futures
361
+
362
+ - How to secure a ticket from the reseller?
363
+ - The reseller told you that you can “book” a ticket at $110. So you will have to buy a ticket at $110 on Nov. 15th regardless of the market price at the time.
364
+
365
+ ## Slide 63: Futures
366
+
367
+ - How to secure a ticket from the reseller?
368
+ - The reseller told you that you can “book” a ticket at $110. So you will have to buy a ticket at $110 on Nov. 15th regardless of the market price at the time.
369
+ - This is called a future contract.
370
+ - Futures are a type of derivative contract agreement to buy or sell a specific commodity asset or security at a set future date for a set price.
371
+
372
+ ## Slide 64: Futures
373
+
374
+ - Would you enter into this future contract at $110 for a Big Game ticket?
375
+
376
+ ## Slide 65: Futures
377
+
378
+ - Would you enter into this future contract at $110 for a Big Game ticket?
379
+ - The market price on Nov 15th turns out to be $80
380
+
381
+ ## Slide 66: Futures - Payoff Diagram
382
+
383
+ - For those who entered the future contract:
384
+ - You buy the ticket at $110 when the market price is $80
385
+ - market price
386
+ - profit/loss
387
+ - 110
388
+ - 140
389
+ - 80
390
+ - -30
391
+ - 30
392
+
393
+ ## Slide 67: Futures - Payoff Diagram
394
+
395
+ - What if the price on Nov 15th is $140?
396
+ - market price
397
+ - profit/loss
398
+ - 110
399
+ - 140
400
+ - 80
401
+ - -30
402
+ - 30
403
+
404
+ ## Slide 68: Futures - Payoff Diagram
405
+
406
+ - What if the price on Nov 15th is $120?
407
+ - market price
408
+ - profit/loss
409
+ - 110
410
+ - 140
411
+ - 80
412
+ - -30
413
+ - 30
414
+
415
+ ## Slide 69: Futures - Payoff Diagram
416
+
417
+ - So the payoff diagram is the following:
418
+ - market price
419
+ - profit/loss
420
+ - 110
421
+ - 140
422
+ - 80
423
+ - -30
424
+ - 30
425
+
426
+ ## Slide 70: Option
427
+
428
+ - What if we want to make sure that the price doesn’t go more than $110, but also want to have the freedom to buy tickets if the actual market price is lower?
429
+ - market price
430
+ - profit/loss
431
+ - 110
432
+ - 140
433
+ - 80
434
+ - -30
435
+ - 30
436
+
437
+ ## Slide 71: Call Options
438
+
439
+ - Call: Gives the holder the right, but not the obligation to buy the underlying stock in the future at a pre-specified price, and this pre-specified price is called the strike price.
440
+ - Strike price = $100
441
+
442
+ ## Slide 72: Call Options
443
+
444
+ - When you buy a call (you are longing a call) with strike price $100,
445
+ - If the stock price is $150, you can exercise your call and buy the stock at $100
446
+
447
+ ## Slide 73: Call Options
448
+
449
+ - When you buy a call (you are in a long call position) with strike price $100,
450
+ - If the stock price is $150, you can exercise your call and buy the stock at $100
451
+ - If the stock price is $100, you can buy the stock at $100
452
+ - If the stock price is $50, you can buy the stock at $50
453
+ - Call option is an option rather than a binding contract!
454
+
455
+ ## Slide 74: Call Options
456
+
457
+ - When you buy a call (you are in a long call position) with strike price $100,
458
+ - If the stock price is $150, you can exercise your call and buy the stock at $100
459
+ - If the stock price is $100, you can buy the stock at $100
460
+ - If the stock price is $50, you can buy the stock at $50
461
+ - Call option is an option rather than a binding contract!
462
+ - Quick check: you would buy a call (long call) if you think the stock price is going up or going down?
463
+
464
+ ## Slide 75: Call Options
465
+
466
+ - When you buy a call (you are in a long call position) with strike price $100,
467
+ - If the stock price is $150, you can exercise your call and buy the stock at $100
468
+ - If the stock price is $100, you can buy the stock at $100
469
+ - If the stock price is $50, you can buy the stock at $50
470
+ - Call option is an option rather than a binding contract!
471
+ - Sanity check: you would buy a call (long call) if you think the stock price is going up or going down?
472
+ - Going up!
473
+
474
+ ## Slide 76: Call Options
475
+
476
+ - You can think about call options as an “insurance”.
477
+ - It insures that you don’t need to pay more than the strike price for a stock.
478
+
479
+ ## Slide 77: Calls
480
+
481
+ - Insurance for people who are short some stock, but this isn’t the most helpful way to think about them.
482
+ - Suppose you want to buy and hold a stock, but you aren’t sure if the value of the stock will go up in a desired time frame. Instead of buying the stock and risking that its value will decrease, you could buy a call that gives you the opportunity to purchase the stock at some price that you want, say $100. That way, if the value of the stock goes above $100, instead of missing out on that increase in value, your call gives you the right to purchase the stock at $100, even though it is actually worth more than $100. If the stock is worth less than $100 after some time, you don’t have to do anything and you didn’t lose the value you would have lost if you had purchased the stock.
483
+
484
+ ## Slide 78: Call Options
485
+
486
+ - Step 1: Buying and selling a call option
487
+ - Long Call
488
+ - Short Call
489
+ - Pay a premium
490
+ - $10
491
+ - A call option
492
+ - Alice
493
+ - Bob
494
+
495
+ ## Slide 79: Call Options
496
+
497
+ - Step 1: Buying and selling a call option
498
+ - Long Call
499
+ - Short Call
500
+ - Pay a premium
501
+ - $10
502
+ - A call option
503
+ - A call option with strike price $100
504
+ - $10 cash
505
+ - Alice
506
+ - Bob
507
+
508
+ ## Slide 80: Call Options
509
+
510
+ - Step 2: (Scenario 1) At expiration date, the stock price is $120
511
+ - Long Call
512
+ - Short Call
513
+ - $100
514
+ - One share of stock
515
+ - A call option with strike price $100
516
+ - $10 - $120 + $100
517
+ - Exercise the option
518
+ - Buy one share of stock at $120 and sell it to the other person at $100
519
+ - Alice
520
+ - Bob
521
+
522
+ ## Slide 81: Call Options
523
+
524
+ - Step 2: (Scenario 2) At expiration date, the stock price is $80
525
+ - Long Call
526
+ - Short Call
527
+ - A call option with strike price $100
528
+ - $10
529
+ - the option expires
530
+ - Alice
531
+ - Bob
532
+
533
+ ## Slide 82: Put Options
534
+
535
+ - Put: Gives the holder the right, but not the obligation to sell the underlying stock in the future at a pre-specified price, and this pre-specified price is called the strike price.
536
+
537
+ <details><summary>Speaker notes</summary>
538
+
539
+ Diagrams are wrong!
540
+
541
+ </details>
542
+
543
+ ## Slide 83: Put Options
544
+
545
+ - You can think about put options as an “insurance”.
546
+ - It insures that you won’t sell less than the strike price for a stock.
547
+
548
+ ## Slide 84: Put Options
549
+
550
+ - You want your stock to be able to increase in value over time, but you also don’t want its value to decrease too much.
551
+ - One way to achieve this is to buy “insurance” on your stock. You might want an insurance contract that will cover losses if the value of your stock goes below a certain number.
552
+ - A Contract that pays you a dollar for each dollar that your stock does below some specified number.
553
+
554
+ ## Slide 85: Put Options
555
+
556
+ - Step 1: Buying and selling a put option
557
+ - Long Put
558
+ - Short Put
559
+ - Pay a premium
560
+ - $10
561
+ - A put option
562
+ - Alice
563
+ - Bob
564
+
565
+ ## Slide 86: Put Options
566
+
567
+ - Step 1: Buying and selling a put option
568
+ - Long Put
569
+ - Short Put
570
+ - Pay a premium
571
+ - $10
572
+ - A put option
573
+ - A put option with strike price $100
574
+ - $10 cash
575
+ - Alice
576
+ - Bob
577
+
578
+ ## Slide 87: Put Options
579
+
580
+ - Step 2: (Scenario 1) At expiration date, the stock price is $80
581
+ - Long Put
582
+ - Short Put
583
+ - $100
584
+ - One share of stock
585
+ - A put option with strike price $100
586
+ - $10 - $100 + $80
587
+ - Exercise the option
588
+ - Buy one share of stock at $100 from the other person and sell it to the market at $80
589
+ - Alice
590
+ - Bob
591
+
592
+ ## Slide 88: Put Options
593
+
594
+ - Step 2: (Scenario 2) At expiration date, the stock price is $120
595
+ - Long Put
596
+ - Short Put
597
+ - A put option with strike price $100
598
+ - $10
599
+ - the option expires
600
+ - Alice
601
+ - Bob
602
+
603
+ ## Slide 89: Put example
604
+
605
+ - So for instance, if you own a stock that trades at $110, and you don’t want to lose more than $10 in value from owning the stock, you might buy a put with a strike of $100.
606
+ - The strike of the put is this pre-specified number below which you don’t want to lose money.
607
+ - Now, let’s say your stock starts going down in value. Going down from $110 to $100, there’s nothing that your put can do.
608
+ - But starting at $100, each dollar that your stock goes down in value, your put pays you one dollar. Therefore, when you own this put in combination with the stock, the overall value of this combination cannot go below $100.
609
+
610
+ ## Slide 90: Analogy with Car Insurance and Put/Call
611
+
612
+ - Understand the loss for Long and Short Position
613
+ - Let’s say that you cannot risk losing more than $10 while trading. There you want to be insured against the risk involved with holding a long/short position
614
+ - Therefore, we will opt for an ‘insurance’ for our stock position!
615
+ - Think about this in terms of Car Insurance and the associated deductibles
616
+ - In this example, since you don’t want to lose more than $10, our ‘deductible’ = $10 and we bought the stock for $100
617
+ - For each dollar below $90 you lose a $1 but also the insurance company pays you $1, so you are even beyond that point.
618
+
619
+ ## Slide 91: Put Options
620
+
621
+ - Put: Gives the holder the right, but not the obligation to sell (100 shares) the underlying stock in the future at a pre-specified price ( strike price)
622
+ - 100-110 = Deductible
623
+ - Insurance - payoff for below 100
624
+
625
+ <details><summary>Speaker notes</summary>
626
+
627
+ Diagrams are wrong!
628
+
629
+ </details>
630
+
631
+ ## Slide 92: Puts and Calls - are just contracts
632
+
633
+ - Notice that all of this occurred without you ever owning the stock to begin with.
634
+ - These are just types of contracts - that get made into financial contracts that can be bought and sold
635
+
636
+ ## Slide 93: Hedging - combine into a portfolio
637
+
638
+ - How do options hedge us against loss?
639
+ - Example: Put
640
+ - +
641
+ - =
642
+ - Different Y axis!
643
+
644
+ ## Slide 94: Option Pricing - we can look at data in Lecture Notebook
645
+
646
+ - Options have premiums
647
+ - Premiums compensate for the person bearing a risk to provide the ‘insurance’
648
+ - Example: Call (Gives the holder the right to buy the underlying stock in the future at a pre-specified price)
649
+ - Factors that determine the price of options:
650
+ - Strike Price: The lower the strike price, the more I am going to charge
651
+ - Time until Expiration: Longer the time period, the more I am going to charge
652
+ - Volatility: If a stocks moves a lot, the more I am going to charge
653
+ - Underlying Stock Price: The higher the price of underlying stock, the more I am going to charge
654
+
655
+ ## Slide 95: Black Scholes
656
+
657
+ - Don’t get intimidated we won’t derive it
658
+ - It take the four factors
659
+ - 𝑆 is the price of the stock,
660
+ - 𝐾 is the strike of the call,
661
+ - 𝑟 is the risk-free interest rate,
662
+ - 𝑇 is time till expiration,
663
+ - 𝑁() is the normal CDF, which measures of variability
664
+
665
+ ## Slide 96: Returns
666
+
667
+ - The return on a security has two components:
668
+ - The change in price of the security
669
+ - Any cash flows associated with the security (dividends for stock, coupons for bonds)
670
+ - Rate of return (r) for change in price over a time interval as
671
+
672
+ ## Slide 97: In the Lecture Notebook
673
+
674
+ - Download data for SPY and Nasdaq
675
+ - Calculate returns
676
+ - Need to know ticker symbol and date range
677
+ - Pandas - calculate returns from difference from last time period
678
+ - In the homework
679
+ - Download Data for other stocks
680
+
681
+ ## Slide 98: Graphs for Returns
682
+
683
+ - Time Series graph of S&P 500 Graph for S&P 500 Returns
684
+
685
+ ## Slide 99: Yfinance
686
+
687
+ ## Slide 100: QuantStats
688
+
689
+ ## Slide 101: Option - Twitter
690
+
691
+ ## Slide 102: Python for Trading Decal - Stat 198
692
+