Navigation

Search

Categories

On this page

網誌將移到 blogspot.com
RiskLib.NET 0.1.1 Released - Ideas about DataSource and DataDestination
Product Coding Scheme in RiskLib.NET
WSJ, Yahoo!Finance, and Bloomberg datasource added to RiskLib.NET with examples
The first part of RiskLib.NET uploaded: DataSource and Product namespace

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: 82
This Year: 0
This Month: 0
This Week: 0
Comments: 61

Sign In
Pick a theme:

 Monday, March 30, 2009
Monday, March 30, 2009 3:32:51 PM (台北標準時間, UTC+08:00) ( .NET Programming | Finance Glossary | Geocaching | GIS | Quant's Life | RiskLib | Travel Log | 古地圖 | 台灣小百岳 | 就是想旅遊 | 微笑319鄉記行 | 投資理財 | 時事評論 | 科學與幻想 | 科學與技術 | 程式交易 | 電影評論 )
目前的這個網站是存放在我自己的主機. 由於網路流量太大經常會有延遲的現象,
所以即日起這個網誌將移到新的位址: http://alvincho.blogspot.com

歡迎大家光臨我新的網誌.

 Saturday, March 07, 2009
Saturday, March 07, 2009 11:46:36 AM (台北標準時間, UTC+08:00) ( .NET Programming | Quant's Life | RiskLib )
I released RiskLib.NET 0.1.1 yesterday after I finished a SQLCeDataSource and an example to retrieve and save data.

The idea I present in this release is getting data from any DataSource and save into any DataDestination. A datasource with IHistoricalSource or IDailyClosingSource interface can retrieve data and convert into generic HistoricalDataList format, then fire a HistoricalDataEvent (defined in IHistoricalBase). The example handle the event at application layer and call SaveData from any DataDestination instance, which can accept HistoricalData as input and save in specified table defined in derived DataDestination class.

The fundamental fields can be handled in the same way and I don't have plan to implement another example. I might focus on mathematical and portfolio parts of RiskLib.NET from now, after I add some content on scope of RiskLib.DataSource.

RiskLib.NET is an open source project hosted in CodePlex.com. You can visit the project at http://risklib.codeplex.com

 Wednesday, February 25, 2009
Wednesday, February 25, 2009 8:42:47 PM (台北標準時間, UTC+08:00) ( .NET Programming | Quant's Life | RiskLib )

Rules of RiskLib Product Coding Scheme

Why Product Coding Scheme

If your company participates many markets and investment instruments, it is very difficult to consolidate so many different sources of market and position data. For example, if you trade US stocks only, you might have IBM stored in a field in your closing price and position tables. But after your portfolio extended into European markets, which are using alphabet as stock code, you will find it is not a good idea to just store the US stock code as a unique key in the table. For many Asian stock markets, including Japan, Hong Kong, Korea, and Taiwan, they are using numbers as stock code.

For fixed-income instruments, that is a more complicated case. Although all issues of bonds have ISIN (International Securities Identification Number), there are still many indices or interests rates have no common coding. ISIN is a good choice for bonds, but we need more.

Global futures market has its own coding scheme, I prefer to use Reuters' codes.

Product Coding Scheme is for Assets or Indices only, not for OTC or derivatives trades

Please note only standard assets (securities or indices) need standardized coding. Over-the-Counter or derivatives trades are usually one of a kind for each trade and is not necessary to define in a coding scheme.

Product Coding Scheme Used in Current Systems

I will introduce coding scheme used in Reuters and Bloomberg later.

Objective of RiskLib Product Coding Scheme

Where is a perfect coding scheme? I don't know. I think a good coding scheme is a key of good risk management system, unless your portfolio is simple and local. I think a good coding scheme should have the following attributes:
  • short
  • product type can be recognized from the code itself
  • connect to offical system

Wednesday, February 25, 2009 7:51:59 PM (台北標準時間, UTC+08:00) ( .NET Programming | Quant's Life | RiskLib )
I added 3 datasource to RiskLib.NET to demostrate how to implement two different interface: IDailyClosingSource, IHisotricalSource, and a special designed datasource: Bloomberg. I also added a example to retrieve data from these datasources.

Although there are still a lot should be modified, the example worked fine to retrieve data from these datasource.

 Tuesday, February 24, 2009
Tuesday, February 24, 2009 9:12:30 PM (台北標準時間, UTC+08:00) ( .NET Programming | Quant's Life | RiskLib )
THe first part of RiskLib.NET source code has been uploaded to codeplex.com. It contains ready for use source code in namespace DataSource and Product. Although not all the code of these two namespace is finished, these are codes that might not be change until next major release.

The RiskLib.DataSource is designed to contain flexible and extensible classes for various financial information sources. A Bloomberg datasource implementation has been included. Bloomberg Professional Services is a very good source for informations for investment. I will include a working example using Bloomberg class to retrieve daily closing and real-time data. Please note: You must have a Bloomberg Professional Service terminal to use this class.

The RiskLib.Product contains object model for some basic financial product. This namespace might have some modification but not expected huge.