Where is Market Manager and How to deal with holidays
Author: rmandel00
Creation Date: 3/31/2012 9:55 AM
profile picture

rmandel00

#1

I am testing trades of defined length starting at options expiration and the (ex)dividend dates. The length of trade is being affected by weekends and holidays. I have managed to work around weekends with the Date[bar].DayOfWeek function. However, I am unable to get the correct exit when there is a holiday intervening. I need to have holidays defined for the correct counting of days in a trade. It appears that Market Manager is an add-in that will help me with this task. I don't see it as an downloadable extension on the wiki, nor in my pull down Tools menu. How do I get on to my WLP platform. Also, if you have simple work arounds for this problem please let me know. If I have trouble using it I will ask some questions.
Thanks,
Rich Man
profile picture

Eugene

#2
The Market Manager is not a downloadable Extension; it's a shared component of other Extensions. Neither it can help with your task nor the Fidelity static data provider supports it.

Show us your code for a better understanding of what the problem is, i.e. how do intervening holidays affect your exits when there's no trading going on holiday dates.
profile picture

rmandel00

#3
Here is the code. It attempts to buy a position some days (DaysHeld) before Dividend is paid and sell it the day before the Dividend is paid. It works okay except when there are holidays thrown into the midst of the holding period. Take the following example of JNJ:
buy sell div-day holiday
11/13/07 11/27/07 11/23/07 Thanksgiving
11/16/10 11/30/10 11/26/10 Thanksgiving
11/15/11 11/29/11 11/25/11 Thanksfiving
Similar problems occur when a dividend is paid around Christmas and New Years, etc.
The number of bars held in the above example are listed at 10. Normally, the number of bars varies and I can live with that but I want the exit to be the day before dividend payment.
Thanks,
Rich Man

CODE:
Please log in to see this code.
profile picture

thodder

#4
Rich,

I rewrote your logic to "buy N-days before ex-dividend and sell the day before the ex-dividend"...

CODE:
Please log in to see this code.


This is only good for back testing the theory to see how it works.
profile picture

thodder

#5
My strategy above was for testing purposes only. There's seem to be some merit to trading around ex-dividend date and it might be worth pursuing a trading strategy.

Is there a way in WLP to retrieve upcoming ex-dividend dates? It appears fundamental items only exist for trading days prior to today.
profile picture

thodder

#6
I appologize. Future ex-dividend dates are included with the "dividend" items. The documentation for TradingDaysBetweenDates (see http://www2.wealth-lab.com/WL5Wiki/TradingDaysBetweenDates.ashx) shows how to handle it.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).