당신은 George Orwell's Animal Farm에서 몇몇 term structures가 다른 것들 보다 더 equal하나도 주장할 지도 모른다. discount-based 구현은 base YieldTermStructure 클래스에서 사용되어지는 것으로 보아 특권이 있는 역할을 가지는 것처럼 보인다. 다욱 symmetric한 구현은 base 클래스(대응되는 pulic 함수들로부터 불리워지는 discountImpl, zeroYieldImpl, forwardImpl)에서 세개의 abstract 함수들을 정의하고 기존의 것에 DiscountStructure 클래스를 추가하면서 세개의 adapters를 제공할지도 모른다.
argument는 sound하다; 사실 YieldTermStructure 클래스의 최초 구현은 symmetric하다. discount-based interface로 교체하는 것과 그것의 이유는 mists of time에서 길을 잃었다(lost in the mists of time), 그러나 InterestRate instances의 사용과 함께 할일이 있을지 모른다; compounding와 frequency의 변화가 필요하기 때문에 zeroYield(to name one method)는 직접 zeroYieldImpl의 결과를 리턴하는 것을 허락하지 않을 것이다.

'quantlib > Implementation' 카테고리의 다른 글

TTP: Template template parameter  (0) 2011.06.20
Aside: twin classes  (0) 2011.06.20
Aside: evaluation date tricks  (0) 2011.06.18
3. Term structure - the shape of things to come  (0) 2011.06.16
Strategy pattern  (0) 2011.06.16
Posted by karlsen

'컴퓨터 & misc 셋팅 > chrome' 카테고리의 다른 글

Speed Dial - Chrome main page with bookmarks  (0) 2011.06.06
툴팁 사전(tooltip dictionary : english-korean)  (0) 2011.06.04
Facebook for Chrome  (0) 2011.06.04
Chromed Bird - Twitter  (0) 2011.06.04
YouTube Downloader  (0) 2011.06.04
Posted by karlsen
만약 평가된 date가 설정되지 않았다면 Settings 클래스는 기본으로 오늘의 date를 리턴한다. 불행히도 이것은 strike of midnight에 조용히(observers에게 알리지 않은채) 바꾼다. 이것은 미스터리한 에러를 발생시킨다. 만약 당신이 overnight calculations를 수행하고 있다면, 히어로즈의 히로상과 같은 위엄을 수행해야만 할것이다 - freeze time. evaluation(평가된) date를 오늘 date로 셋팅하는 것은 명백히 고정이 되는 것이다. 이것은 오늘이 내일로 넘어가도 마찬가지가 된다.

알고 있을만한 trick: 만약 너의 모든 term structure가 이동한다면, 평가된 date를 내일의 date(당연히 모든것들은 변하지 않도록 유지하면서)로 설정하고 당신의 instruments의 가치를 재평가하는 것은 당신에게 당신의 포트폴리오의 daily theta를 주게 될 것이다.  

'quantlib > Implementation' 카테고리의 다른 글

Aside: twin classes  (0) 2011.06.20
Aside: symmetry break  (0) 2011.06.19
3. Term structure - the shape of things to come  (0) 2011.06.16
Strategy pattern  (0) 2011.06.16
Template Method pattern  (0) 2011.06.15
Posted by karlsen

블로그 이미지
Pricing, hedging, risk-managing a complex derivative product
karlsen

태그목록

공지사항

Yesterday
Today
Total

달력

 « |  » 2025.9
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함