How do I change MatLab's internal table of holidays (BUS/252)?
2 ビュー (過去 30 日間)
古いコメントを表示
Luiz Fernando Carnot R de Almeida
2013 年 11 月 4 日
Hi!
I am working with MatLab's Financial Instruments Toolbox to calculate interest rates for the Brazilian Bond Market (day count basis = BUS/252).
In spite of having the BUS/252 option for the calculations I need, MatLab's default calendar is NYSE based so my results will be wrong if I use this business calendar as it is provided.
I already have a vector of serial date numbers corresponding to all holidays and nontrading days that apply to the Brazilian market but I found no way of changing MatLab´s internal table of holidays.
Can someone please let me know how to change MatLab's internal table of holidays?
Thanks in advance.
Fernando
(*) I found out that there is a http://www.FinancialCalendar.com paying option to create a file holidays.m file. Is this the only way? I already have the data required. Do I have to pay this company to get the same data in another format? http://www.mathworks.com/help/finance/createholidays.html
0 件のコメント
採用された回答
Sean de Wolski
2013 年 11 月 4 日
If you look at the source code for holidays
>> edit holidays.m
You'll see an option for altholidays, this is a file you'll have to write yourself, to return the date numbers of the dates you don't want.
1 件のコメント
Selene Chen
2022 年 6 月 21 日
Hi Sean, can you elaborate on how this is done? do I create a text file altholidays.txt with the additional holidays I want? We use functions like isbusday, busdate in quite a lot places in our process, do I need to define the altholidays every time I use these functions, or all the functions will pick up the altholidays automatically?
その他の回答 (2 件)
Luiz Fernando Carnot R de Almeida
2013 年 11 月 5 日
2 件のコメント
Kazim
2024 年 10 月 30 日
Hi Fernando, How did you solve this issue exaclty? I can't understand from the comments above. TIA!
参考
カテゴリ
Help Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!