Blog Archives

Life Is Short, Use Python

November 24, 2010
By
Life Is Short, Use Python

Life is short, use PythonI started to play with Python two weeks ago due to the limitation of R in terms of handling large data, then a friend of mine suggested me to try Python since I had to do data massage frequently, "Python is the best choice, trust me", he...

Read more »

Handling Large Datasets in R

Handling large dataset in R, especially CSV data, was briefly discussed before at Excellent free CSV splitter and Handling Large CSV Files in R. My file at that time was around 2GB with 30 million number of rows and 8 columns. Recently I started to collect and analyze US corporate bonds tick data from year...

Read more »

R API to Interactive Brokers Trader Workstation

Interactive Brokers via Matlab was mentioned at the old post Matlab trading code, IBrokers: R API to Interactive Brokers Trader Workstation is the R package I realize for algo trading API. Should you are also interested, you can watch the following sh...

Read more »

Liquidity Premium vs Liquidity of Corporate Bonds

Liquidity Premium vs Liquidity of Corporate Bonds

All else equal, investors should require higher returns on assets whose liquidity is lower, in other words, investors demand a higher expected return, and hence larger liquidity premium, by holding a less liquidity asset. Risk & return co-exist.Is this really true for corporate bonds? I run a simple regression using R to test my data, where US corporate bonds...

Read more »

R Optimization Function Test

R Optimization Function Test

Using Kalman Filter for CIR interest rate model parameter estimation was introduced at my previously post Kalman Filter finance, soon after that I got a few comments saying the final results are unstable and highly depend on the initial values, that's...

Read more »

Missing Data in R

September 12, 2010
By
Missing Data in R

Probably all of us have met the issue of handling missing data, from the basic portfolio correlation matrix estimation, to advanced multiple factor analysis, how to impute missing data remains a hot topic. Missing data are unavoidable, and more encompassing than the ubiquitous association of the term, irgoring missing data will generally lead to biased estimates. The...

Read more »

R Reshape Package

September 6, 2010
By
R Reshape Package

Some of you may know this R reshape package already, I have started to play with it after the post Handling Large CSV Files in R. It is really an excellent one worthing a new post to introduce formally.What is reshape package? reshape: Flexibly reshape data, Reshape lets you flexibly restructure and aggregate data using just two...

Read more »

Handling Large CSV Files in R

A follow-up of my previous post Excellent Free CSV Splitter. I asked a question at LinkedIn about how to handle large CSV files in R / Matlab. Specifically, Quotationsuppose I have a large CSV file with over 30 million number of rows, both Matlab / R lacks memory when importing the data. Could you...

Read more »

Excellent R Code Format Package

Excellent R Code Format Package

I have been looking for this type of package for several days, and luckily found it today. Unquestionable R is powerful, however, R programming is unfriendly as far as I concern, mainly due to the lack of format shortcut, which makes the R codes rathe...

Read more »

Simple Dummy R GUI Generator

Simple Dummy R GUI Generator

Imagine you finish a dirty coding project and want to present to your boss who is not in a good mood (may not be occasionally), how are you going to start? Show him your hundreads of lines code, point to the lines, explain what the arguments and outputs are? No, it is not a smart way since you are...

Read more »