avaialable from (https://rpubs.com/staszkiewicz/FM_OE)
Format: liknk to published rpubs
Form of transfer: only through Niezbednik, section send letter to leading - please past and copy link to published page
Team: a maximum of three people, each person from a different country. On the front of the report: the names of the authors with an indication of the sections of which they were the main performers.
Statements
Authors’ statement of non-infringement of others’ copyrights:
Authors’ statement as to how the AI tool was used during the assignment.
Authors’ statements on the use of the task under a public access license.
Deadline for submission of the project: December 2, 2024
Beginning of the school term: assume May 1, 2024
End of the school term: assume September 30, 2024
Length of the study no more than: 24,000 words
Data: All codes and data embedded in the document ie. , that for each standalone code execution section, the data must either be downloaded from a public repository or generated inside the task. If you have any questions, please consult during class.
Projects, given after the deadline, are not graded, and have a status of “failed”.
Plase use the ‘code chunck’ to show your workings in R.
Author1 Name, country
Author2 Name, country
Author3 Name, country
Date of the project:
Date of the submission:
Date of the revision:
Date of acceptance:
# Create a data frame with column names
table_data <- data.frame(
Beginning_of_Term = character(),
End_of_Term = character()
)
# Function to add rows to the table
add_row <- function(category, data) {
table_data <<- rbind(table_data, data.frame(
BoT = category,
EoT = paste(data, collapse = ", ")
))
}
# Stock market index information
add_row("S&P 500 (stock) index level:", c(NA, NA)) # Replace NAs with actual values
add_row("Nasdaq Composite (stock) index level:", c(NA, NA))
# Interest rate information
add_row("Prime rate:", c(NA, NA))
add_row("Federal funds rate:", c(NA, NA))
# ... other interest rates
add_row("Commercial paper rate (90 days):", c(NA, NA))
add_row("Certificate of deposit rate (3-month):", c(NA, NA))
add_row("Treasury bill rate (13 weeks):", c(NA, NA))
add_row("Treasury bill rate (26 weeks):", c(NA, NA))
# Bond yield information
add_row("Treasury long-term bond yield:", c(NA, NA))
add_row("Corporate (Master) bond yield:", c(NA, NA))
add_row("High-yield corporate bond yield:", c(NA, NA))
add_row("Tax-exempt (7–12-year) bond yield:", c(NA, NA))
# Display the table
table_data
## BoT EoT
## 1 S&P 500 (stock) index level: NA, NA
## 2 Nasdaq Composite (stock) index level: NA, NA
## 3 Prime rate: NA, NA
## 4 Federal funds rate: NA, NA
## 5 Commercial paper rate (90 days): NA, NA
## 6 Certificate of deposit rate (3-month): NA, NA
## 7 Treasury bill rate (13 weeks): NA, NA
## 8 Treasury bill rate (26 weeks): NA, NA
## 9 Treasury long-term bond yield: NA, NA
## 10 Corporate (Master) bond yield: NA, NA
## 11 High-yield corporate bond yield: NA, NA
## 12 Tax-exempt (7–12-year) bond yield: NA, NA
BoT - Beginning of the term EoT - End of the term (deadline for the report)
# Create a data frame with column names
table_data <- data.frame(
Beginning_of_Term = character(),
End_of_Term = character()
)
# Function to add rows to the table
add_row <- function(category, data) {
table_data <<- rbind(table_data, data.frame(
BoT = category,
EoT = paste(data, collapse = ", ")
))
}
# Stock market index information
add_row("S&P 500 (stock) index level:", c(NA, NA)) # Replace NAs with actual values
# Display the table
table_data
## BoT EoT
## 1 S&P 500 (stock) index level: NA, NA
Stocks |
Description | BoT | EoT |
---|---|---|
New York Stock Exchange: Stock price: | ||
Name of the firm ________ Dividend: | ||
Nasdaq Market: Stock price: | ||
Name of firm ____________Dividend: |
Use futures prices quotations to record the recent (“settle”) price of the following futures (select futures with first settlement date beyond the end of the school term):
Description | BoT | EoT |
---|---|---|
Treasury bond futures: | ||
S&P 500 index futures: | ||
Nasdaq Market: Stock price: | ||
British pound futures: |
Use an options quotations table to select a call option on a firm whose stock price you expect to increase (select the option with the first expiration month beyond the end of the school term):
Name of firm: ____________
Expiration month:_________
Strike price:___________
Description | BoT | EoT |
---|---|---|
Stock price: | ||
Option premium: |
Use an options quotations table to select a put option on a firm where you expect the stock price to decrease (select the option with the first expiration month beyond the end of the school term):
Name of firm: ____________
Expiration month:_________
Strike price:___________
Description | BoT | EoT |
---|---|---|
Stock price: | ||
Option premium: |
Use a currency exchange rate table to record exchange rates:
Description | BoT | EoT |
---|---|---|
Exchange rate of the British pound (in $): | ||
Exchange rate of the Japanese yen (in $): | ||
Exchange rate of the Mexican peso (in $): |
Use currency options data (if available) to select a call option on a foreign currency that you expect will strengthen against the dollar (select the option with the first expiration month beyond the end of the school term):
Currency:________
Expiration month: _____________
Strike price: ___________
Description | BoT | EoT |
---|---|---|
Currency’s existing value: | ||
Option premium: |
Use currency options data (if available) to select a put option on a foreign currency that you expect will weaken against the dollar (select the option with the first expiration month beyond the end of the school term):
Currency:________
Expiration month: _____________
Strike price: ___________
Description | BoT | EoT |
---|---|---|
Currency’s existing value: | ||
Option premium: |
download basic statistic of NASDAQ and London Stock Exchange and compare them
library(quantmod)
## Ładowanie wymaganego pakietu: xts
## Ładowanie wymaganego pakietu: zoo
##
## Dołączanie pakietu: 'zoo'
## Następujące obiekty zostały zakryte z 'package:base':
##
## as.Date, as.Date.numeric
## Ładowanie wymaganego pakietu: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(dplyr)
##
## ######################### Warning from 'xts' package ##########################
## # #
## # The dplyr lag() function breaks how base R's lag() function is supposed to #
## # work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or #
## # source() into this session won't work correctly. #
## # #
## # Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
## # conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop #
## # dplyr from breaking base R's lag() function. #
## # #
## # Code in packages is not affected. It's protected by R's namespace mechanism #
## # Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning. #
## # #
## ###############################################################################
##
## Dołączanie pakietu: 'dplyr'
## Następujący obiekt został zakryty _przez_ '.GlobalEnv':
##
## add_row
## Następujące obiekty zostały zakryte z 'package:xts':
##
## first, last
## Następujące obiekty zostały zakryte z 'package:stats':
##
## filter, lag
## Następujące obiekty zostały zakryte z 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ lubridate 1.9.3 ✔ tibble 3.2.1
## ✔ purrr 1.0.2 ✔ tidyr 1.3.1
## ✔ readr 2.1.5
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::first() masks xts::first()
## ✖ dplyr::lag() masks stats::lag()
## ✖ dplyr::last() masks xts::last()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
#zrob z tego tutorialu https://lgreski.github.io/dsdepot/2020/09/05/plotting-multiple-timeseries.html
# Get data for NASDAQ Composite and FTSE 100
getSymbols("^IXIC", src = "yahoo") # NASDAQ Composite
## [1] "IXIC"
getSymbols("^FTSE", src = "yahoo") # FTSE 100
## Warning: ^FTSE contains missing values. Some functions will not work if objects
## contain missing values in the middle of the series. Consider using na.omit(),
## na.approx(), na.fill(), etc to remove or replace them.
## [1] "FTSE"
#
# # Calculate basic statistics
# nasdaq_stats <- IXIC %>%
# as.data.frame() %>%
# na.omit() %>%
# summarise(
# mean_price = mean(IXIC$IXIC.Adjusted),
# median_price = median(IXIC$IXIC.Adjusted),
# sd_price = sd(IXIC$IXIC.Adjusted)
# )
#
# ftse_stats <- FTSE %>%
# as.data.frame() %>%
# na.omit() %>%
# summarise(
# mean_price = mean(FTSE$FTSE.Adjusted),
# median_price = median(FTSE$FTSE.Adjusted),
# sd_price = sd(FTSE$FTSE.Adjusted)
# )
#
#
# #Assuming you have daily data
# IXIC <- IXIC
# IXIC$index <- 0
#
# View(IXIC)
# FTSE <- FTSE
#
# FTSE$index <- 1
#
# combined_data <- rbind(IXIC, FTSE)
#
# combined_data <- rownames_to_column(combined_data , var = "group")
#
# ggplot(combined_data, aes(x = date, y = IXIC.Adjusted, color = index)) +
# geom_line() +
# theme_minimal()
L3.1 Compare the 13-week Treasury bill rate (which is a proxy for short-term interest rates) at the end of the school term to the rate that existed at the beginning of the school term. (note: 3-Month Treasury Bill Secondary Market Rate, Discount Basis (TB3MS)) https://fred.stlouisfed.org/series/TclB3MS
L3.2 Why interest rates change over time.
Perfomr the test for the Coca cola shares reaction to the event of the publication in EDGAR financial statementas for the year ended 2022.
Tip: You might assume that the date of the filling to edgar is the event day.
Commercial bank operations
For the commercial bank that you selected at the beginning of the term, use its annual report or any other related information to answer the following questions:
L5.1 Identify the types of deposits that the commercial bank uses to obtain most of its funds.
L5.2 Identify the main uses of funds by the bank. c. Summarize any statements made by the commercial bank in its annual report about how recent or potential regulations will affect its performance.
L5.3 Does it appear that the bank is attempting to enter the securities industry by offering securities services? If so, explain how.
L5.4 Does it appear that the bank is attempting to enter the insurance industry by offering insurance services? If so, explain how.
Commercial bank management
L5.5 Assess the bank’s balance sheet as well as any comments in its annual report about the gap between its rate-sensitive assets and its rate-sensitive liabilities. Does it appear that the bank has a positive gap or a negative gap?
L5.6 Determine the bank’s interest income as a percentage of its total assets.
L5.7 Determine the bank’s interest expenses as a percentage of its total assets.
L5.8 Determine the bank’s net interest margin.
L5.9 Determine the bank’s noninterest income as a percentage of its total assets. Determine the bank’s noninterest expenses (do not include the addition to loan loss reserves here) as a percentage of its total assets.
L5.10 Determine the bank’s addition to loan loss reserves as a percentage of its total assets.
L5.11 Determine the bank’s return on assets.
L5.12 Determine the bank’s return on equity.
L5.13 Identify the bank’s income statement items described previously that would be affected if interest rates rise in the next year, and explain how they would be affected.
L5.14 Identify the bank’s income statement items described previously that would be affected if U.S. economic conditions deteriorate, and explain how they would be affected
Mutual funds
For the mutual fund that you selected at the beginning of the term, use its prospectus or any other related information to answer the following questions.
L5.15 What is the investment objective of this mutual fund? Do you consider this mutual fund to have low risk, moderate risk, or high risk?
L5.16 What was the return on the mutual fund last year? What was the average annual return over the last three years?
L5.17 What is a key economic factor that influences the return on this mutual fund? (That is, are the fund’s returns highly influenced by U.S. stock market conditions? By U.S. interest rates? By foreign stock market conditions? By foreign interest rates?)
L5.18 Must any fees be paid when buying or selling this mutual fund?
L5.19 What was the expense ratio for this mutual fund over the last year? Does this ratio seem high to you?
Securities firms
For the securities firm that you selected at the beginning of the term, use its annual report or any other related information to answer the following questions.
L5.20 What are the main types of business conducted by the securities firm? L5.21 Summarize any statements made by the securities firm in its annual report about how it may be affected by existing or potential regulations. L5.22 Describe the recent performance of the securities firm, and explain why the performance has been favorable or unfavorable.
L1. Explain the Gordon model for equity valuation (dividends valuation model)
Comparing yields among securities
L7.1 What is the difference between the yield on corporate high-quality bonds and the yield on Treasury bonds at the end of the school term? Explain why does the difference exist?
L7.2 What is the difference between the yield on long-term Treasury bonds and the yield on long-term municipal bonds at the end of the school term? Explain why does the difference exist?
Assessing the forecasting ability of the yield curve
L7.3 What was the difference between the 26-week T-bill yield and the 13-week T-bill yield at the beginning of the school term?
L7.4 Does this imply that the yield curve had an upward or downward slope at that time?
L7.5 Assuming that this slope can be primarily attributed to expectations theory, did the direction of the slope indicate that the market expected higher or lower interest rates in the future?
L7.6 Did interest rates move in that direction over the school term?
Explaining shifts in the yield curve over time
L7.7 What was the difference between the long-term Treasury bond yield and the 13-week T-bill yield at the beginning of the school term?
L7.8 What is the difference between the long-term Treasury bond yield and the 13-week T-bill yield at the end of the school term?
L7.9 Given your answers to the two previous questions, describe how the yield curve changed over the school term. Explain the changes in expectations about future interest rates that are implied by the shift in the yield curve over the school term.
The Fed’s influence on interest rates
L7.10 Did the Fed change the federal funds rate over the school term?
# library(quantmod)
#
# # Get the federal funds rate
# getSymbols("FEDFUNDS", src = "FRED")
#
# # Explore the data
# head(FEDFUNDS)
# plot(FEDFUNDS)
L7.11 Do you think the movements in interest rates over the school term were caused by the Fed’s monetary policy? Explain.
Measuring and explaining premiums on money market securities
L7.12 What is the difference between the yield on 90-day commercial paper and the yield on 13-week T-bills at the end of the school term? Eexplain why this premium exists.
L7.13 Compare the premium on the 90-day commercial paper yield (relative to the 13-week T-bill yield) that exists at the end of the school term to the premium that existed at the beginning of the term. Eexplain why the premium may have changed over the school term.
Explaining bond premiums and price movements
L7.14 What is the difference between the yield on high-yield corporate bonds at the end of the school term versus the yield on high-quality corporate bonds at the beginning of the school term?
L7.15 Compare the long-term Treasury bond yield at the end of the school term to the longterm Treasury bond yield that existed at the beginning of the school term. Given the direction of this change, did prices of long-term bonds rise or fall over the school term?
L7.16 Compare the change in the yields of Treasury, municipal, and corporate bonds over the school term. Did the yields of all three types of securities move in the same direction and by about the same degree? Explain why yields of different types of bonds move together.
L7.17 Compare the premium on high-yield corporate bonds (relative to Treasury bonds) at the beginning of the school term to the premium that existed at the end of the school term. Did the premium increase or decrease? Why this premium changed over the school term.
L11.1 Assume that you purchased an S&P 500 futures contract at the beginning of the school term, with the first settlement date beyond the end of the school term. Also assume that you sold an S&P 500 futures contract with this same settlement date at the end of the school term. Given that this contract has a value of the futures price times $250, determine the difference between the dollar value of the contract you sold and the dollar amount of the contract that you purchased.
L11.2 Assume that you invested an initial margin of 20 percent of the amount that you would owe to purchase the S&P 500 index at the settlement date. Measure your return from taking a position in the S&P 500 index futures as follows. Take the difference determined in the previous question (which represents the dollar amount of the gain on the futures position) and divide it by the amount you originally invested (the amount you originally invested is 20 percent of the dollar value of the futures contract that you purchased).
L11.3 The return that you just derived in the previous question is not annualized. To annualize your return, multiply it by 12/m, where m is the number of months in your school term.
L11.4 Assume that you purchased a call option (representing 100 shares) on the specific stock that you identified of this project. What was your return from purchasing this option? [Your return can be measured as \(\frac{Prem_{t} − Prem_{t−1}}{Prem_{t−1}}\), where \(Prem_{t−1}\) represents the premium paid at the beginning of the school term and \(Prem_t\) represents the premium at which the same option can be sold at the end of the school term.] If the premium for this option is not quoted at the end of the school term, measure the return as if you had exercised the call option at the end of the school term (assuming that it is feasible to exercise the option at that time). That is, the return is based on purchasing the stock at the option’s strike price and then selling the stock at its market price at the end of the school term.
L11.5 Annualize the return on your option by multiplying the return you derived in the previous question by 12/m, where m represents the number of months in your school term.
L11.6 Compare the return on your call option to the return that you would have earned if you had simply invested in the stock itself. Notice how the magnitude of the return on the call option is much larger than the magnitude of the return on the stock itself. That is, the gains are larger and the losses are larger when investing in call options on a stock instead of the stock itself.
Determining swap payments
L11.7 Assume that, at the beginning of the school term, you engaged in a fixed-for-floating rate swap in which you agreed to pay 6 percent in exchange for the prevailing 26-week T-bill rate that exists at the end of the school term. Assume that your swap agreement specifies the end of the school term as the only time at which a swap will occur and that the notional amount is $10 million. Determine the amount that you owe on the swap, the amount you are owed on the swap, and the difference. Did you gain or lose as a result of the swap?
Measuring and explaining exchange rate movements
L11.8 Determine the percentage change in the value of the British pound over the school term. Did the pound appreciate or depreciate against the dollar?
L11.9 Determine the percentage change in the value of the Japanese yen over the school term. Did the yen appreciate or depreciate against the dollar?
L11.10 Determine the percentage change in the value of the Mexican peso over the school term. Did the peso appreciate or depreciate against the dollar?
L11.11 Determine the per unit gain or loss if you had purchased British pound futures at the beginning of the term and sold British pound futures at the end of the term.
L11.12 Given that a single futures contract on British pounds represents 62,500 pounds, determine the dollar amount of your gain or loss.
L12.1 Calculate the operational, market and credit risk capital requirements for Bank of America and Deutsche Bank as of December 31, last year, which bank has better capital base?