Question: How do I setup the following in R ? A simple portfolio model for the soybeans farmer may be written as: R t = R

How do I setup the following in R?
A simple portfolio model for the soybeans farmer may be written as:
Rt=Rtc-bt-1Rtf,
where Rt denotes the returns on holding a portfolio of cash and futures positions between
time t-1 and time t.Rtc is the return on holding the (long) cash position between time t-1
and t, that is, the return to storing the grain over a fixed period of time. Rtf is the return
on holding a short futures position between time t-1 and t. And bt-1 is the hedge ratio,
which is defined as the proportion (fraction) of the cash position to be hedged in the futures
market at time t-1 for sale at time t. For present purposes, we assume there are no costs
associated with hedging.
The variance on the return of the portfolio is given by:
Var(Rt)=Var(Rtc)+(bt-1)2Var(Rtf)-2bt-1Cov(Rtc,Rtf),
where Var(xt) is a variance operator such that Var(xt)=xt2 and Cov(xt,yt) is a covariance
operator such that Cov(xt,yt)=xyxt2yt22.
 How do I setup the following in R? A simple portfolio

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!