python R语言 计算金融代写

  1. [Optimal hedging ratio] The following is a problem to analyze the dynamic relationship between futures price and spot price. The data file spot_future.csv contains time series data of spot prices and futures prices of beans, soybean oil, wheat, corn and coffee (‘s’ is the spot price and ‘f’ is the futures price). The data is daily data from March 23, 1990 to March 24, 2010 and was obtained in the Chicago futures market. Some researchers have used this data to study futures hedging. Let ft and st be the log futures price and the log spot price, respectively. Answer the R code and the results for each of the following problems.

(a) Consider the following regression equation.

 

∆st =α+β∆ft +εt, t=1,2,···,T

(1)

Here, β is the optimal hedge ratio. Why? Also estimate the optimal hedging ratio using the least squares method.

(b) Equation (1) has no assumptions about error term. If the error term follows ARMA (p, q)

lets do it. this is

Where assumes a normal distribution with an average of 0 and a variance of
Estimate the optimal hedging ratio of Eq. (1) using the best estimate method.

 

(c) Suppose that εt follows ARMA (p, q) -GARCH (1,1). this is

to be. In this case, estimate the optimal hedging ratio of Eq. (1) using the best estimate method.

(d) Which of the optimal hedging ratios obtained in (a) – (c) above minimizes the variance of the hedged portfolio? Note that the hedge portfolio is given by Pt = Δst – βΔft.

 

 

 

2. [Hedonic Price Determination Model] housing.txt is a variable indicating the apartment price and the characteristics of apartments in a specific area of ​​Hong Kong considered in class time. Analyze how apartment prices are determined on an average basis by apartment characteristics. Analyze the heterogeneity of determinants according to the level of the at-trade price using quantile regression. Based on the results of this analysis, write a three-page report on apartment pricing factors.