oxdk_day4a - A d v a n c e d P r o g r a m m i n g i n Q u...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A d v a n c e d P r o g r a m m i n g i n Q u a n t i t a t i v e E c o n o m i c s Introduction, structure, and advanced programming techniques 17 – 21 August 2009, Aarhus, Denmark Charles Bos [email protected] VU University Amsterdam Tinbergen Institute Advanced Programming in Quantitative Economics – p. 1 Day 4 - Morning 9.00L Objects ◦ Concepts ◦ Modelbase and issues 10.30P Estimating a duration model ◦ Setting up a class ◦ Moving the likelihood 12.00 Lunch Advanced Programming in Quantitative Economics – p. 2 Object oriented programming Two programming styles: 1. Function oriented (as before) 2. Object oriented (here) Objects are declared, with certain properties. Changing the properties, calling other properties, we write our program. ⇒ entirely different paradigm. Simplest explanation through example Advanced Programming in Quantitative Economics – p. 3 Object: Example oxtut4a.ox #include <oxstd.h> #import <database> main() { decl dbase; dbase = new Database(); dbase.Load("data/data.in7"); dbase.Info(); delete dbase; } As user of class : • new to create object of class object = new classname ( . . . ); is a function call to the constructor function. May do nothing, here: creates an empty database. • make function calls to object object . function ( . . . ) • delete to remove object from memory delete object ; Advanced Programming in Quantitative Economics – p. 4 Example: Arfima modelling Compare ARMA models: z t − φ 1 z t − 1 − ··· − φ p z t − 1 = ǫ t + θ 1 ǫ t − 1 + ··· + θ q ǫ t − q , t = 1 , .., T (1 − Φ( L ))( y t − μ ) = Θ( L ) ǫ t Introducing (fractional) integration: (1 − Φ( L ))(1 − L ) d ( y t − μ ) = Θ( L ) ǫ t Regression effects: μ t = x ′ t β Advanced Programming in Quantitative Economics – p. 5 Objects: Advantage...
View Full Document

Page1 / 15

oxdk_day4a - A d v a n c e d P r o g r a m m i n g i n Q u...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online