• Nie Znaleziono Wyników

Advanced Econometrics

N/A
N/A
Protected

Academic year: 2021

Share "Advanced Econometrics"

Copied!
6
0
0

Pełen tekst

(1)

Advanced Econometrics

Introduction to R

Michał Rubaszek

SGH Warsaw School of Economics

(2)

1. Operations on vectors and matrices

2. Conditioning, loops, defining functions

3. Importing data (read.csv, Quandl, quantmod, Eurostat)

4. Converting and plotting data (ts, zoo, xts)

5. Simple vs. compound interest rate

Content of R codes

(3)

Simple rate of return:

1

Compound interest rate ( is compounding frequency):

1 ,

Continuously compound interest rate:

lim 1 , exp

Logarithmic rate of return:

exp ln /

Rates of return / growth rates

(4)

Simple returns:

 Easy to calculate for a portfolio of assets: !%$& #$ $

 Easy to communicate to non-statisticians

 Not symmetric nor additive...

Log returns:

 Symmetric and additive

 Easy to communicate to statisticians

 Difficult to calculate for a portfolio of assets: ! ' ∑%$& #$ $ We will work with log returns

Rates of return / growth rates

(5)

Exercises

Exercise 0.1.

Write an algorithm, which would allow to calculate the roots of the equation:

(

)

* ) +

,

-

knowing that they are in the interval . *3,3 0.

[Hint: make two loops with functions for and while]

Exercise 0.2.

Create a function invVal(Y,h,R,m)that will calculate the value of investment after ℎ years, given that the annual interest rate is

and compound frequency .

Use the function to calculate the value of 1000PLN after 1 year for

21,2,4, ∞6 and 10%.

(6)

Exercises

Exercise 0.3.

Using the

eurostat package import to R the annual growth rate of real GDP in Poland (at quarterly frequency). Write a series as a zoo object and make a plot. What was the average growth rate over the last 10 years

Exercise 0.4.

Import daily data for the WIG index from the Internet to R. After converting the series to a zoo object, make a panel of figures for

 historic prices

 logarithmic growth rates

 ACF for levels

 ACF for growth rates

Cytaty

Powiązane dokumenty

[r]

Bogaty materiał faktograficzny przedstawiony przez autora prowadzi do wniosku, że za znany­ mi z dotychczasowych publikacji rozmowami politycznymi między emigracyjnymi organami

A very good agreement of experimental data with numerical solutions was observed in the case of pseudo-steady state response to the rectangular wave change of dilution rate. Analyzing

A new method is proposed for the determination of the stationary one-component nucleation rate J with the help of data for the growth probability P 2 of a dimer which is the

As of December, 2015, Georgia has trading relations with 137 countries, and entrepreneurs from over 50 foreign states have economic interest in the country (National Statistics

Obtained results yield the polar derivative analogues of some inequalities giving estimates for the growth of derivative of lacunary polynomials.. The Bernstein inequality that

As an illustration parts of the thalli of Parmelia conspersa (No. 16a) and Parmelia prolixa (No. 18) were taken and the mean value per surface unit of the thallus of both species

In this article we define a modified first return time for estimating en- tropy for a Markov chain and obtain a very sharp estimate of the convergence rate of its average and propose