# Blog

## Certificate in Quantitative Investment (CQI)

Posted by on Jul 15, 2013 in News | 0 comments

Numerical Method Inc. has the vision to promote rational investment and trading. Jointly organized with top universities, we are offering a 6-months 9-courses program that teach mathematics, programming and quantitative or algorithmic trading. We invite famous and established traders from Wall Street banks and funds to share their experience. Students may choose to participate in classroom or online. More information can be found here: http://en.cqi.sg...

## Solving the "Corner Solution Problem" of Portfolio Optimization

Posted by on Jun 19, 2013 in AlgoQuant, Algorithmic Trading, Investment | 0 comments

Many portfolio optimization methods (e.g., Markowitz/Modern Portfolio Theory in 1952) face the well-known predicament called the “corner portfolio problem”. When short selling is allowed, they usually give efficient allocation weighting that is highly concentrated in only a few assets in the portfolio. This means that the portfolio is not as diversified as we would like, which makes the optimized portfolio less practically useful. In [Corvalan, 2005], the author suggests to look for instead an “almost efficient” but...

## Change of Measure/Girsanov’s Theorem Explained

Posted by on May 16, 2013 in Seminars | 1 comment

Change of Measure or Girsanov’s Theorem is such an important theorem in Real Analysis or Quantitative Finance. Unfortunately, I never really understood it until much later after having left school. I blamed it to the professors and the textbook authors, of course. The textbook version usually goes like this. Given a probability space , and a non-negative random variable Z satisfying (why 1?). We then defined a new probability measure Q by the formula, for all . Any random variable X, a measurable process adapted to the natural...

## Mean-Variance Portfolio Optimization When Means And Covariances Are Unknown

Posted by on Feb 16, 2013 in AlgoQuant, Algorithmic Trading | 1 comment

[Lai, Xing and Chen, 2010], in the paper “Mean-Variance Portfolio Optimization When Means And Covariances Are Unknown”, proposed a ground breaking method to do portfolio optimization. In what follows we summarize their idea and use it to implement a periodic rebalancing strategy based on the AlgoQuant framework. Harry Markowitz won the Nobel prize for his work in mean-variance (MV) portfolio optimization in 1950s. The theory is widely regarded as fundamental in financial economics. It says, given a target return of a portfolio of...

## FREE .NET/C# Numerical/Math library

Posted by on Dec 25, 2012 in SuanShu | 2 comments

On this Christmas Day, we are happy to announce that SuanShu.net is FREE for all! SuanShu.net has all the features as its Java sibling as well as has undergone the same many thousands of test cases daily. There are a tutorial and examples that show you how to build a SuanShu application in Visual Studio. One major advantage of using SuanShu.net over the Java version is that it integrates seamlessly with Microsoft Excel. By incorporating SuanShu library in your spreadsheet, you literally have access to hundreds of numerical algorithms when...

Posted by on Dec 21, 2012 in AlgoQuant, Programming | 2 comments

Bloomberg maintains tick-by-tick historical data for only 140 days. However, you may want to backtest your strategies with a longer history. In this case, you can archive these tickdata by yourself and do backtesting with the archived data. Since version 0.2, AlgoQuant supports downloading tick-by-tick data from Bloomberg and saving them as CSV files via the Bloomberg Java API v3 (assuming that you have access to a Bloomberg terminal). After you download the AlgoQuant package, you will find that there is a folder lib/blpapi-dummy which...

## SuanShu 2.0

Posted by on Dec 13, 2012 in SuanShu | 0 comments

We are proud to announce the release of SuanShu 2.0! This release is the accumulation of customer feedbacks and our experience learnt in the last three years coding numerical computation algorithms. SuanShu 2.0 is a redesign of the software architecture, a rewrite of many modules, additions of new modules and functionalities driven by user demands and applications, numerous bug fixes as well as performance tuning. We believe that SuanShu 2.0 is the best numerical and statistical library ever available in Java, if not all, platform. Here are...

## Trading and Investment as a Science

Posted by on Sep 3, 2012 in Algorithmic Trading, Investment, Seminars | 0 comments

Here is the synopsis of my presentation at HKSFA, September 2012. The presentation can be downloaded from here. 1. Many people lose money playing the stock market. The strategies they use are nothing but superstitions. There is no scientific reason why, for example, buying on a breakout of the 250-day-moving average, would make money. Trading profits do not come from wishful thinking, ad-hoc decision, gambling, and hearsay, but diligent systematic study. • Moving average as a superstitious trading strategy. 2. Many professionals make money...

## Using SuanShu on Amazon EC2

Posted by on May 21, 2012 in SuanShu | 0 comments

Cloud computing is very popular nowadays. Delegating your CPU-intensive computation (or simulation) to the cloud seems to be a smart choice. Many of our users asked if SuanShu can be run on Amazon’s Elastic Compute Cloud (EC2), because SuanShu license requires a MAC address and they have no control on which machine being used when they launch an EC2 instance. Here comes a good news! Amazon Web Service (AWS) now supports Elastic Network Interface (ENI), by which you can bind your EC2 instance to a specified network interface....

## Data Mining

Posted by on Feb 12, 2012 in Algorithmic Trading | 0 comments

The good quant trading models reveal the nature of the market; the bad ones are merely statistical artifacts. One most popular way to create spurious trading model is data snooping or data mining. Suppose we want to create a model to trade AAPL daily. We download some data of, e.g., 100 days of AAPL, from Yahoo. If we work hard enough with the data, we will find a curve (model) that explains the data very well. For example, the following curve perfectly fits the data. Suppose the prices are Of course, most of us are judicious enough to avoid...