• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Testing a model - MatLab??

Joined
5/20/08
Messages
102
Points
28
Hey Guys

I have a question that I hope you can help me with. I have made a model for stock data. More specificaly, I have made a cointegration model, which I have specified pretty well, looking at the relationship between sectoral stock indices from 1926 to 2007.

I would then like to test it, and see whether I can achieve a return that is higher than the market return by using the model. My own idea is to take the cointegrationmodel, and in some way make a program that can use that model to assess whether to buy/sell an index. But how do I build such a model? Any suggestions in any way is appreciated!
 
Did you back test the model? It looks like you use data for a very long period of time. Try to test it using data from 2008 (always test the model with new data - as stupid as it sound, that's a very common mistake)

How do you plan to trade the model? I mean what time frame? Did you take into consideration trading costs?
 
Ups, 1986 not 1926

Yeah, but I would like to estimate the model based on the entire sample available (2008 not yet available), could I do that? Fx estimate the model, and then for each year use it to assess quality??
 
Yeah, but I would like to estimate the model based on the entire sample available (2008 not yet available), could I do that?

Why not? It's not clear what you're asking here... Just fix yourself at the time (e.g. 1/5/1990), and run your model on the data released prior to that day.

You have to make sure you don't use data that wasn't available at the time you make your simulated trading decision. For example, if you use some economic number as of a given date, make sure it is the actual number that was released on that day, as opposed to the revision.
 
Okay, let me clarify

I have data from 1926 (hence the mistake) to 2007. However, after speaking to one of the worlds leading experts in cointegration, I was advised only to use the period 1983 to 2007, as this is the only period in which the relations are somewhat constant. So let's say I have data from 1983 to 2007.

I would then like to build up a model, and see if the model could give me better returns on my portfolio than the "market return". My question is then: should I estimate the model from 1983 to 2007, and then use the model to see if I can get better returns from 1983 to 2007 than the market return? And if so, how do I do that? Or, should I rather estimate a shorter timespan, fx 1983 to 2006, and then test the model from 2006 to 2007? (I have an idea how to do that, but if you have suggestions for this then let me know:))

Thanks!
 
Back
Top