I'v got 6 different equity index time series from which I want to create an index based on a particular percentage. This would be simple although due to different holidays the date don't always match. I'm looking for a method in Matlab which matches dates and uses the previous value of the index when one (or more) index has a holiday while the others don't. Anybody an idea?



Sounds more like a programming question, but what you stressed is relevant, you need to define a methodology to deal with this calendar issue. The options you have are whether choose the smallest common set of dates to calculate your index, or use previous close. Choosing between the two involves investability of your index IMO. Would you be able to purchase the underlyings or at least etfs tracking them on holidays date ?

Also, another aspect to define in your methodology is the dates on which you would rebalance your weights in order to retarget your target percentage allocation.

  • $\begingroup$ In my case the percentages stay fixed because a derivative is based on the equity basket with fixed percentages. I would like the have a code which checks every monday - friday dates and see which index has a value. If an index doesn't have a value then just take the previous business day value. $\endgroup$ – Oamriotn May 24 '16 at 7:41
  • $\begingroup$ I would suggest you having a look at functions fints, datenum and weekday. $\endgroup$ – Stravog May 24 '16 at 8:22

I have made a solution to an index construction but not in Matlab but in C++ with Visual Studio. Maybe you would like to check it out. It automatically spits out the index from the Bloomberg stream data (https://github.com/RTRindex/raleigh-triangle-index)

  • $\begingroup$ unfortunately I don't have access to visual studio. $\endgroup$ – Oamriotn May 24 '16 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.