精选博文

C++ implementation of a simple order book

Please refer to my github for the code:  https://github.com/DongliangLarryYi.  1.      Data Structure 1.1   A basic or...

Tuesday, January 31, 2017

C++ implementation of a simple order book


Please refer to my github for the code: https://github.com/DongliangLarryYi. 

1.     Data Structure

1.1  A basic order
Each order include ID, Side (buy or sell), Price, and Size.

//  Thanks to Daniel Cao who provided part of this code
#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
#include <fstream>

#define MAX_ID 100000 // at most 100000 orders
using namespace std;

// structure of an order which include id, side, price, size and related functions
class Order{
private:
    int id;
    char side;
    double price;
    int size;

Thursday, January 19, 2017

Summary of some machine learning concepts and methods

Concepts
Cost function: It is used to measure the accuracy of a predictive model. It takes an average difference of all the results predicted by the model with inputs from x's (features or explanatory variables) and the actual output y's. (Week 1 of Andrew Ng’s class)
Regularization: It is added in the cost function to put some penalty on parameters of a model. It is used to prevent overfitting. (Week 3)
Gradient descent: It is a method to find the local minimum of a function with respect to some parameters. It is used in machine learning to find the best parameters in the model. (Week 1)

Tuesday, January 10, 2017

Life experience in physics and finance - book review of ‘My life as a quant’

Basic introduction of the book                

The author, Emanuel Derman, is a co-developer of the short rate model – Black-Derman-Toy model. He is also the director of Columbia’s Financial Engineering program. One special thing worth mentioning is that he switched his career from physics to finance at his 40’s.

I read this book with recommendation from a financial engineering program. It is said to be useful for me to understand and accelerate a career in quantitative finance.

The first half part of this book is about Emanuel’s life in physics, and it is not related to finance.

The second part is about his work and thoughts in wall street. The interesting part is that he had worked with many top quantitative finance researchers and practitioners, so the description of these talented guys (including author) is interesting for me to understand how they worked and thought on quantitative finance. 

Sunday, January 1, 2017

My different stages in reading WSJ

Initial stage

I started to read WSJ with intention after the recommendation from a famous financial engineering program in US. It is said that reading WSJ is important for a graduate to find a financial job. Then I began to read articles on WSJ, but these articles were way long and took me half an hour to read. Some articles on the homepage seemed not interesting or related to me.  

Gradually as I spent more time on CFA preparation and solving technical problems in financial engineering, I read WSJ less than before. I skimmed headlines and only read interesting ones. As a result, my reading became more related to world news especially in East Asia which I am familiar with. Although I keep reading headlines on the homepage, I have less interest to read these unfamiliar and uninteresting articles.