Navigation

Search

Categories

On this page

FRM Passed
FpML and financial derivatives
Google Map API and ArcWeb Services
100 Minor Peak Trails in Taiwan
The first cache I found!
太空電梯的運輸成本
太空電梯的錨站
您要到幾樓? 第一億樓? 請搭太空電梯...
Operational Risk and Multi-Agent System
Value at Risk for a long horizon
Honeymoon Cruise in Tahiti (02) One Night in Beachcomber Tahiti
Honeymoon Cruise in Tahiti (01) I am in Paradise
Honeymoon trip to Tahiti
Using CME EuroDollar Futures to Build LIBOR Yield Curve and Swap Curve
Reading Excel files from .NET/C#

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 75
This Year: 0
This Month: 0
This Week: 0
Comments: 31

Sign In
Pick a theme:

 Monday, January 16, 2006
Monday, January 16, 2006 2:00:36 PM (台北標準時間, UTC+08:00) ( Quant's Life )

After waiting for 2 months for exam result, I finally got a notification from GARP that I passed 2005 FRM Exam.

I thought I might not pass it because I didn't know how to solve most of questions in the exam. I am lucky enough that I got good scores in many section. The exam result shows only in Quartile.

Credit Risk Measure and Management: 1st Quartile
Market Risk Measure and Management: 2nd Quartile
Operational and Integrated Risk Management, Legal, Accounting, and Ethics: 2nd Quartile
Quantitative Analysis: 1st Quartile
Risk Management in Investment Management: 1st Quartile

 

 Tuesday, December 20, 2005
Tuesday, December 20, 2005 11:14:11 PM (台北標準時間, UTC+08:00) ( Finance Glossary | Quant's Life )

FpML (Financial product Markup Language) is a good choice to store and to process financial derivatives. Current specification 4.2 Working Draft has defined the following produts:

  • Interest Rate Swap (plain vanilla IRS, quanto swap)
  • Interest Rate Option (caps/floors/collars)
  • Credit Default Swap
  • Equity Forward
  • Equity Option (European, American, Bermuda, Exotic)
  • Equity Swap
  • Asset Swap
  • Forward Rate Agreement (FRA)
  • FX Average Rate Option
  • FX Barrier Option
  • FX Digital Option
  • FX Simple Option
  • FX Swap
  • Swaption

For more information, you can go to FpML Website.

 Tuesday, October 25, 2005
Tuesday, October 25, 2005 11:32:12 AM (台北標準時間, UTC+08:00) ( GIS )

I spotted the Google Map APIs for a while. In my opinion, as a web developer in Taiwan, I might choose Google Map as my tool. I don't mean Google Map is better than ArcWeb Services. In fact, Google Map offer just basic mapping APIs and can't compare with ESRI ArcWeb. But ESRI ArcWeb Services offers little content outside US. We can't get detailed sattlelite images of Taiwan from ArcWeb. Google Map and Google Earth really have very detailed images of urban areas in Taiwan.

But, Google Map has no road map in Taiwan, although ArcWeb has only outdated large scale road map. The best choice is to have your own ArcGIS Server and purchase your own data, it might cost tens thousands US dollars. If you are looking for free services, there are always trade-offs.

For information about ArcWeb Services, http://www.esri.com/software/arcwebservices/index.html

For information about Google Map API: http://www.google.com/apis/maps/

 Sunday, October 16, 2005
Sunday, October 16, 2005 10:46:00 PM (台北標準時間, UTC+08:00) ( Geocaching | Travel Log | 就是想旅遊 )

Taiwan is a beautiful island with many beautiful scenes. It has more than 100 peaks taller than 3000 meters (9000 feet). In 2003, Taiwanese government picked 100 mountains which were accessible in 1 day from urban area. Most of them have roads directly connected to the trails and closed to major cities. The elevations are from 100 meters to more than 2000 meters.

Currently I can't find any information about these trails in English, so I will provide information at my travel website at http://www.jumboguide.com/guide/tt.aspx?forumid=45&lang=English

 Saturday, October 15, 2005
Saturday, October 15, 2005 7:29:45 PM (台北標準時間, UTC+08:00) ( Geocaching )

Although it is Saturday, my wife and me woke up at 5:30am. We were going to find our first geocache. We picked the nearest cache, only 1km away my home, at the top of Hemei Mountain by the Green Lake (BiTan). We arrived the platform on the top of trail. It took us 20 minutes to search the cache. Finally we found it. There are tens have logged it. We took an elephant key ring and put some old Taiwanese stamps in it. We are very happy for success at our first hunt.

 Tuesday, August 30, 2005
Tuesday, August 30, 2005 10:52:49 AM (台北標準時間, UTC+08:00) ( 科學與幻想 )

各國政府不會把 Capital Cost 算入太空計畫的成本當中,
所以 Marginal Cost, 邊際成本才是考量重點.
Dr. Edwards 預估在第一部太空電梯完成後.
每公斤運輸的實際變動成本是220美元.

太空電梯的建造成本大概與太空梭差不多,
但是單位運輸成本可以降低.
第一座太空電梯的成本估計約一百億美元,
主要任務應該是建立第二座太空電梯,
第二座的成本估計是三十億美元,
一旦越來越多太空電梯建造完成,
太空貨運可自給自足不需政府補助,
未來可望降到每公斤10美元以下.

如果建造成本完全要由民間自付,
估計含建造和維護成本要四百億美元,
每公斤的價格要到3000美元.
相較於目前運於在地球同步軌道每公斤20000美元來說,
還是便宜多了.

 Saturday, August 27, 2005
Saturday, August 27, 2005 7:57:02 PM (台北標準時間, UTC+08:00) ( 科學與幻想 )

太空電梯地面的錨站 (anchor station) 有固定式和移動式,
移動式的大概都是規劃在海上,
可以視情況移動位置躲避惡劣天氣.

也有規劃在高樓頂端, 這樣子可以有便宜的電力,
雖然只是幾百公尺的高度, 但可以讓最底部的纜線寛度大幅降低.

Dr Edwards 目前提案是在東太洋赤道附近的 Galapagos 群島西邊建立浮動錨站,
利用現有的鑽油平台技術就可以了.
據他說這個地點距離最近的海上和空中航線有650公里,
可以降低意外和恐怖攻擊的機會.

 Friday, August 26, 2005
Friday, August 26, 2005 4:06:51 PM (台北標準時間, UTC+08:00) ( 科學與幻想 )
太空電梯的概念已經有超過一百年的歷史, 一向都是被歸類在科幻的領域;
直到最近奈米碳管的出現, 解決了技術上最大的挑戰: 又輕又堅固的纜線材料,
這個概念突然之間就熱門起來了, 從科幻構想一躍成為太空計畫的一部份.

這一期 IEEE Spectrum 中有一篇 Dr. Edwards 對太空電梯的完整介紹,
看了覺得很有趣, 所以提出來跟大家分享.
太空電梯的確仍有許多困難有待克服, 製造問題應該可望在十年內會有解.
這想法一開始是很天真地認為建造一個這樣子的電梯可以讓太空活動更方便,
沒想到真的有實現的一天.

別再認為這是幼稚可笑的想法, 這會比登陸火星還要早實現.
看看 Wiki 的說明比較清楚.
 Monday, August 15, 2005
Monday, August 15, 2005 4:17:48 PM (台北標準時間, UTC+08:00) ( Quant's Life )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

I studied FRM materials and got an indea last night. It is hard to define the operational risk of financial institutes, in fact, any institutes. But a multi-agent system might be a good choice to simulate operational risk. Blow is a rough idea:

To simulate operational risk in Department A, which has
1 department head, 10 traders, 2 risk managers, 5 back office

defined communication lines:
deapertment head to everyone: 17
traders cross: 10x9=90
traders to risk managers: 10x2=20
traders to back office have no full route: 15
risk managers to back office: 2x5=10

defined probability of error of each person and each lines
defined potential loss of each person when he/she failed to perform unintentionally

defined probability of intentional error of each person
defined potential loss of each person when he/she failed to perform intentionally

We can now start to simulate. This model is too simple for any existing environment. We can have the PCs, telecomm lines, and any equipments into the model. Also external events and entities. If we got 500 persons and 10000 entities, we still can do it use MAS.

Let it be my next project.

 Thursday, August 11, 2005
Thursday, August 11, 2005 8:45:04 PM (台北標準時間, UTC+08:00) ( Quant's Life )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

I was asked about VaR of a 20 years fixed-income or fund. VaR is an estimate about potential profit or loss in a short term, says 1, 5, or 10 days. How about VaR for a 20 years maturity government bond? Or for someone want to evaluate his long-term investment?

We know VaR is getting larger as the term longer:

n days VaR = 1 day VaR * sqrt(n)

if 1 day VaR is v
5 days VaR is v * sqrt(5) = 2.236v
10 days VaR is v * sqrt(10) = 3.162v

if you evaluate longer term
365 days VaR is 19.105v
3650 days VaR is 60.415v
7300 days VaR is 85.440v

Wow, the potential profit or loss might be very high.

By definition is true, of course, but we know it is not in practice. Why?

Because long term volatility is hard to estimate and the rule of square n is not a good way to calculate even short term VaR.

I clawed the webs and found only one paper about long term VaR model.
See Long-Term Value at Risk. By. Kevin Dowd, David Blake, and Andrew Cairns

Thursday, August 11, 2005 6:48:13 PM (台北標準時間, UTC+08:00) ( Travel Log )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

Date 12/11/2004

After passing the custom, a beautiful Polyneasian girl present wreaths for us. Because our cruise will start embarking next day, we take a bus to the hotel IntercContinental BeachComber Tahiti. 30 odd people are probably all westerners on the bus, only another pair of Oriental's face. We knew later that they are Chinese lived in San Francisco. All the travellers on the cruise, as we knew, only we come from Asia. All others are very surprised we come from so far a place. In fact, it is only a little farer compare with European visitors. The Europeans all take plane from Paris to Los Angeles to transfer to Tahiti. Travel by cruise is familiar by westerners but not for orientals, that's why there are only few orientals onboard.

Arriving the hotel ten minutes later, again we waited for a long time too of check-in, It seems the people here are not in a hurry.  A beautiful girl at the other side of counter answered every questions slowing. A group of travellers carried the luggage and wait behind of us. Wait until our check-in When the check-in is finished, all of us are nailed black and blue by the mosquito.

Because we are only one night in transit here, so has not lived in the "over the water bungalow". Our room is rich of south asian style, coconut trees outside the balcony hide most of our view of sea. TVs are mostly French programs, two or three English movie channels and ESPN, but we do not want to watch TV. We put down our baggages and go to the first floor to see tonight's performance.

We sat on a good place in the restaurant and paid the first bill in Tahiti. The price on the menu is franc CFP of Pacific Ocean of local currency, we are not still very familiar with the exchange rate, two cups of fruit juice, unexpectedly it is nearly 17 euro. Fortunately the meal will be served free on the cruise from tomorrow. Otherwise it can really called very good weight-reducing journey.

The show is traditional Polyneasian dance. If you have ever been to Guam or Hawaii must see the similar performance. Strong rhythm and wild movementare the characteristics of the Oceania dance. The dancers invited audienced to show on the stage and perform together. We have a lot of fun.

The poolside after the performance was very quiet, and the scene of hotel is very beautiful too. When I was planning the honeymoon, my wife said it was very regrettable that we are in Tahiti but not lived in the on the water bungalow. I think it is not a issue after this night on the ground.

 Wednesday, August 10, 2005
Wednesday, August 10, 2005 1:14:32 PM (台北標準時間, UTC+08:00) ( Travel Log )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

Date: 2004/12/7

It becomes the destination of my honeymoon because there is only few Taiwanese has been Tahiti. We are not celebrities, just want to visit somewhere special to us. Tahiti is a mysterious place for most of Taiwanese, even for most of Asian. No Chinese travel guide, no travel agent to ask for help, no one knows where is Tahiti, and most of my friends never heard about it.

But, Tahiti is always on Top 10 best destination for anything, Top 10 Paradises, Top 10 Honeymoon Trips, Top 10 Romantic, all of these have Tahiti on them. My wife wanted to go to the famous Heart of Voh in New Caledonia, but it is really a challenge to go there from Taiwan and nothing else is really worth to visit for my honeymoon. So we decided to go to Taihiti.

We transferred via Los Angeles because our cruise, the six-star motorship Paul Gauguin, has an optional air package. It cost much less than transferred via Auckland by ourselves, but it took 2 hours longer if not counted 3 hours waiting for transit at LAX. We stay in LA for 2 nights then fly to Tahiti in the third morning of my honeymoon.

After 8 and a half hours we arrived Faaa International Airport in Taihiti. Faaa is quite different from our images about international airports. As soon as we get off the plane, a mini band playing Polynesian music welcomed us. The small arrival custom hall decorated with a large Gauguinian wall painting. I made a mistake to go to a line only for EU residents. I said sorry for passing the wrong line. The custom officer said, "That's ok, you are in paradise."

Wednesday, August 10, 2005 12:49:14 PM (台北標準時間, UTC+08:00) ( Travel Log )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

I travelled to Tahiti for my honeymoon, with my wife of course, from 12/8 to 12/20 in 2004. I originally wrote a log in Chinese. I will translate it to English to share with friends all over the world.

Wednesday, August 10, 2005 11:51:53 AM (台北標準時間, UTC+08:00) ( Quant's Life )

Note: For visitors of your site, this entry is only displayed for users with the preselected language English/English (en)

Using EuroDollar Futures to build a LIBOR Yield Curve are good for whom are using them to hedge USD interest rate derivatives. We usuallly use swap curve to build forward curve for Taiwanese Dollar. It's new to me to do it.

Frankly it is really straightforward. First you have to convert EuroDollar Futures quotes to their implied spot rate. When you have a series of the spot rates of different maturity, you can treat it as a normal spot curve to bootstrap its forward curve.

Wednesday, August 10, 2005 10:18:05 AM (台北標準時間, UTC+08:00) ( .NET Programming )

First you must declare using namespace

   using Microsoft.Office.Interop.Excel;

if the Office Primary Interop Assemblies is installed in your system. If not, you can get it at http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en

Microsoft has changed the design of Office Primary Interop Assemblies in Office 2003. So if you want to read Excel files from a system with Office 2002 or before, you must use:

   Excel.Application excel = new Excel.Application();

   Excel.Workbook theWorkbook = excel.Workbooks.Open(
               FileName,,Missing.Value,Missing.Value,Missing.Value,Missing.Value,
               Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,
               Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);

You can't use null as parameters, that will cause an exception.

in Office 2003, Excel is just a namespace and everything has a Class postfix:

   ApplicationClass excel=new ApplicationClass();

   Workbook theWorkbook = excel.Workbooks.Open(
               FileName,,Missing.Value,Missing.Value,Missing.Value,Missing.Value,
               Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,
               Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);

After you open the workbook, you can use the following codes to get data into your memory:

   ws=(Worksheet)wb.Sheets[1];
   r=ws.get_Range("B3","K100");
   values=(object[,])r.Value2;

the Range.Value2 return a 2-dimension array of object. The first represents rows and the second represents columns. For example, if you want to get the value in B10, which is the 8-th row and the first column is return range r. You can use

   v=values[8,1].ToString();

to get the value. You will know many features in Excel COM Model are missing in the .NET imlementation.