Financial EconometricsMatlab

Java Python 

 

 

I.  Financial Price and Return

 

Consider a 60-month (5 year) investment in two assets: the Vanguard S&P 500 index

(VFINX) and Amazon stock (AMZN). Suppose you buy one share of the S&P 500 fund and one share of Amazon stock at the end of January, 2011 for

Pvfinx ,t−60   = 108, Pamzn ,t−60   = 170 , and then sell these shares at the end of January, 2016 for

Pvfinx ,t   = 179, Pamzn ,t   = 587 . (Note: these are actual adjusted closing prices taken from    Yahoo!).  In this question, you will see how much money you could have made if you invested in these assets right after the financial crisis.

 

a.   What are the simple 60-month  (5-year) returns for the two investments?

 

 

 

 

 

 

b. What are the continuously compounded (cc) 60-month (5-year) returns for the two investments? Why are the cc returns smaller?

 

 

 

 

 

 

c. Suppose you invested $1,000 in each asset at the end of January, 2011. How much would each investment be worth at the end of January, 2016?

 

 

 

 

 

d. What are the compound annual returns on the two 5 year investments?

 

 

 

e. At the end of January, 2011, suppose you plan to invest in a portfolio of VFINX and

AMZN over the next 60 months (5 years). Suppose you purchase 10 shares of the VFINX mutual fund (at $108/share) and 10 shares of AMZN stock (at $170/share). What is the

value of your initial investment? What are the portfolio weights in the two assets as of the end of January, 2011?

 

 

 

 

 

 

 

 

 

 

f. Using the results from part a. compute the 5-year simple and cc portfolio returns. What is the value of your portfolio at the end of January, 2016?

 

 

g. Go to http://finance.yahoo.com and download monthly data on a stock of your choice (except Starbucks and Amazon) over the period January, 2015 to January, 2024.  Read

the data into Excel and make sure to reorder the data so that time runs forward. Delete all  columns except those containing the dates and the adjusted closing prices. Save the file as a .csv (comma separated value) file and call it examprice.csv.

(i) Plot the monthly closing price data of your stock using the plot() function. Please add a legend.

(ii) Compute monthly simple and continuously compounded returns. Plot these returns separately first. Then also plot on the same graph.

(iii) Calculate the growth of $1 invested in your stock, and report the plot of future values.

 

II. Constant Expected Return and Single Index Model

 

Consider the constant expected return (CER) model

rit  μi  εit εit  ~ iid N(0,σi2 )    cov(rit rjt ) = σij cor(ritrjt ) = ρij

for the monthly simple returns on the Vanguard S&P500 index (VFINX) and Amazon

stock (AMZN) presented in part I above. Below are simulated returns and some graphical descriptive statistics for VFINX and AMZN from the CER model calibrated using the

sample estimates of the CER model parameters for the two assets (these are the sample statistics from the table of the previous question).

 

 

 

 

 

 

a. Which features of the actual returns shown in part I are captured by the simulated CER model returns and which features are not?

 

 

 

 

 

 

 

 

 

 

 

 

 

b.  Does the CER model appear to be a good model for VFINX and AMZN returns? Why or why not?

 

c.  For each asset, compute estimated standard errors for  ,   andρ(ˆ) . Using the table

below, show the estimates in one row and the standard errors in another row. (i) Briefly  comment on the “co-movement” between the two assets. (ii) What do you expect for the sign of beta of AMZN if you estimate the Single Index Model for AMZN?

 

 

^

μvfinx

^

μamzn

^

σvfinx

^

σ

^

pfvinx,amzn

Estimate

 

 

 

 

 

Std. Error

 

 

 

 

 

 

 

 

 

 

d.  For Amazon (AMZN) only, compute 95% confidence intervals for mu         

### 如何在 MATLAB 中安装 Financial Toolbox 要在 MATLAB 中安装 Financial Toolbox,可以按照以下方法操作: #### 使用 Add-On Explorer 进行安装 从 MATLAB R2018a 开始,MathWorks 提供了一个名为 **Add-On Explorer** 的工具来管理各种附加产品,包括 Financial Toolbox。通过此工具可以直接下载并安装所需的工具箱[^1]。 运行 MATLAB 后,在主页选项卡中找到 **Add-Ons** 按钮,点击进入 Add-On Explorer 界面。在此界面中搜索 “Financial Toolbox”,然后选择安装即可完成配置过程。 如果版本较旧(如引用中的 R2010b),则需手动安装 toolbox 或者联系 MathWorks 获取支持文件。 #### 手动安装方式 (适用于早期版本) 对于更早的 MATLAB 版本(例如 R2010b),可能无法直接使用上述图形化界面来进行安装。此时可以通过以下方式进行手动安装: 1. 插入原始安装光盘或者挂载 ISO 镜像; 2. 在安装过程中勾选需要安装的工具包,其中包括 Financial Toolbox; 3. 如果已经完成了基础版 MATLAB 的安装而未选择该工具箱,则重新启动安装程序,并仅添加 Financial Toolbox 组件而不影响现有设置[^2]。 另外需要注意的是,某些功能依赖于其他特定模块的支持,所以在实际应用前还需确认相关环境已正确搭建完毕[^3]。 ```matlab % 示例代码展示如何加载 financial 工具箱内的函数 if exist('license', 'builtin') && license('test', 'financial_toolbox') disp('Financial Toolbox is installed and ready to use.'); else error('Please install the Financial Toolbox first.'); end ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值