精选博文

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...

Saturday, September 30, 2017

Default rate of corporate debts and their portfolios - Book review of ‘Credit risk modeling using Excel and VBA’

I read this book since credit risk management of collateral loans is key to manage the performance of CLO tranches. In fact, it may be useful for any structured product’s credit analysis.

Individual level

There are two default prediction methods for individual debt: regression analysis and structured method. Regression analysis uses logistic regression and explanatory variables to predict default probability of a borrower. A credit score can be derived during this process to indicate borrower’s ability to repay the debt.

Sunday, September 10, 2017

What side incomes may I own in the future?

Credit Cards

Credit cards are vastly used in US, and they give many benefits to card owners.

Sign-up bonus: It requires card owner to finish a total transaction amount to get this bonus. For example, the Chase Freedom credit card provide a $150 bonus if new card owner spends $500+ in first three months. The equivalent annual return is 120% (150/500 * 4). The zero annual fee makes holding this card no future cost. Similar cards include Chase freedom, Chase freedom unlimited, Discover, American Express Blue cash, etc.

Sunday, August 20, 2017

What information do we need to rate a CLO investment?

CLO is a kind of securitized products which build CLO tranches based on cash flows from a leveraged loans pool. In order to analyze the performance of CLO tranches, we need to know the information of the leveraged loans in the pool. These loans’ Probability of Default (PD), Recovery Rate (RR), Default Correlations and Prepayment rates, are needed for us to have a better understanding of a CLO deal.

Here I would like to introduce a Moody’s methodology [1] on CLO analysis. The methodology is aimed to give a rating to CLO tranches. Since prepayment do not affect the credit rating, so no prepayment is discussed here.  

Sunday, July 23, 2017

Experiences of top quants

-Book review of ‘How I became a quant’

This book tells stories of 25 famous quants, and their stories were written by quants themselves. So, you will see their different writing styles and experiences.
·      Most of them have a Doctor’s degree in STEM. It is reasonable because quants need to apply quantitative skills in solving financial problems, and advanced degrees are a proof of their strong academic problem solving skill.
·      25 quants have careers in different areas, including structured finance, portfolio management, risk management, derivatives, algorithmic trading, etc. It shows the broad application of quantitative tools in current finance industry.
·      Many of them worked for small companies focusing on a small area. The other many quants led quantitative groups within big and well known financial groups.

Sunday, July 2, 2017

Why CLO may be a good investment opportunity?


Development of CLO

Collateralized loan obligation (CLO) is a form of structured products. It pools hundreds of business loans and passes cash flows to tranches of different priorities in receiving cash flow. Normally, these business loans are from below investment grade companies, which normally need to provide higher yield in their bond issuance. CLO is great at attracting all types of investors from risk averse to risk taking, to invest in corporate debts which were considered risky and not suitable for risk averse investors.

The first CLO was issued in 1987, and it provided incentives for depository banks to securitize these loans and remove these loans from their books by selling them to outside investors. The 2007-08 financial crisis is a big hit on the CLO market, although the key reason for the crisis was from subprime mortgage instead of corporate loans. Investors doubted the safety of CLOs since they have a similar structure with problematic subprime Collateralized debt obligation (CDO) and CDO2. However, CLO quickly gained favor from investors, and had been the first type of secured products that recovered to the pre-crisis trading volume. 

Sunday, February 26, 2017

Why do we care about Libor?

Background

The London Interbank Offered Rate (Libor) is the expected interest rate for leading banks in London to borrow money from other banks. Libor rates are calculated for five currencies and seven borrowing periods ranging from overnight to one year. It is considered to be the most important number in the financial world because at least $350 trillion in derivatives and other financial products are tied to it. (Article)

The Libor was invented by Minoz Zombanakis, who tried to let banks lend $80 million to the cash-strapped Iran in 1969. Banks hesitated to lend money at a fixed rate for long periods, because of the rising inflation in UK. Zombanakis offered a solution in which the interest rate would be recalculated every few months. He marketed the deal to a variety of local and foreign banks that could each take a slice, and the banks in the syndicate would report their funding costs just before a loan-rollover date. The weighted average plus a spread for profit became the price of the loan for the next period, and the rate was called London interbank offered rate (Article).

In 1984, the British Bankers’ Association (BBA) established the BBA standard for interest rate swaps including the fixing of BBA interest-settlement rate, which was later officially called BBA Libor in 1986.

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.

Sunday, November 27, 2016

Two valuable skills which took me years to perform well

Priority setting
Priority setting is the process of determining which tasks are most important. While it's not hard to be busy and crank out the tasks on my to-do list, it's difficult to choose to do the important things - to live my life by priorities.

Compared to some suggestions of setting daily priorities, I consider a long term target to be more important and useful. First, a long term target can help us focus and achieve a not easy target during a long time. Second, with a long term target in mind, it is easy and natural to know what I need to do in a daily base. For example, when I entered financial engineering program at the University of Illinois, I set my first semester’s target to be building knowledge base of quantitative finance. This easily led me to focus on my coursework and FRM exam every day during that semester.

Thursday, September 29, 2016

The history of 2010 Flash Crash

By Dongliang “Larry” Yi

Background


The 2010 Flash Crash was a US stock market crash, which started at 2:32 pm, May 6th EDT and lasted for approximately 36 minutes. The Dow Jones Industrial Average experienced its largest intraday point drop, plunging 998.5 points (about 9%) from the opening, most within minutes, only to recover a large part of the loss[1]. Other stock indexes, such as S&P 500, Russell 3000 and Nasdaq Composite, also collapsed and rebounded very quickly. This market crash immediately caused trillion-dollar market loss, and recovered most of the value at the close. Some blue-chip stocks, like Procter & Gamble, traded as low as $0.01[2], but closed at $60.75.   


Sunday, August 28, 2016

Lehman Brothers in the 2007-08 Financial Crisis

Wrote by Dongliang "Larry" Yi on Nov. 18, 2015


1.     Economic Crisis, Financial Crisis or Credit Crisis?

When the 2007-08 Financial Crisis is first reported in China, I was a graduate student who is interest in the business world. The first concern of mine is that it may affect my job hunting. So, what is 2007-08 Crisis, and the influences on the financial industry?

1.1 Chain Effect

First, the name of this crisis. Generally, we use ’Economic Crisis’ for those depressed periods of capitalist countries. But this time, most media call it financial crisis, or credit crisis. The key reason is that this time, the most affected industry is concentrated in financial industry, and the incentive of this crisis is the credit issue in housing market.

Second, the credit risk. Although US has a great credit system compared to China, it also has credit risks. To be frank, there are still a lot of people in US do not deliver their commitment in Loan. To start with, we need to know the housing bubble of US before talking about this crisis. The US housing market experienced high growth after the stock market crash in 2000. The subprime loans had increased 292% from 332 million in 2003 to 1.3 trillion in 2007[1]. When the housing price crashed in 2007, many subprime loads went to default and caused a chain results. [8]

Thursday, August 25, 2016

What everyone is saying about CCAR?

By Dongliang “Larry” Yi
       
The Origin of CCAR

The 2008 financial crisis is considered to be the worst financial crisis since the Great Depression of the 1930s. [1] It caused banks to be acquired or bankrupted, including Lehman Brothers and Merrill Lynch. Concerns on bank solvency, falls in credit availability and impaired investor confidence affected worldwide equity markets, where investors experienced huge losses during 2008 and early 2009. Economies worldwide slowed during this period, as credit tightened and international trade dropped. US government bailout banks and prevented the collapse of US financial system. [2]

This bailout is called Troubled Asset Relief Program (TARP) in which US government purchased toxic assets from financial institutions to help stabilize the US financial system and restart economic growth. The Dodd-Frank Wall Street Reform and Consumer Protection Act (Dodd-Frank) was passed to protect money spent in TARP. [2] In Nov. 2011, Comprehensive Capital Analysis and Review (CCAR) is introduced by the Federal Reserve in order to measure, regulate, and supervise large Bank Holding Companies (BHCs). [3] The Federal Reserve want to ensure that BHCs have vigorous processes for determining how much capital they need to maintain access to funding and continue to function as credit intermediaries, even under adverse situations. [4]
   

Wednesday, July 13, 2016

Pricing American-Options Using the Trinomial Model with Memoization

By Dongliang “Larry” Yi


1. Code

//  main.cpp
//  American_Option_Tri_Memoi
//
//  Created by Dongliang Yi on 11/23/15.
//  Copyright © 2015 Dongliang Yi. All rights reserved.
//

Value-at-Risk Computed Using Various Methods (Historical Simulation, Delta-normal method, Delta-Normal method using the exponentially weighted covariance estimator, Historical simulation using rescaled returns)

By Dongliang “Larry” Yi

Problem:



1.     Historical Simulation

#thousand.000
VaR <- vector("numeric", length=246)

for (i in 1:246)
{
PLGBP = (1000/(data$GBPUSD[i:(i+1999)]*data$UKX[i:(i+1999)]))*data$GBPUSD[(i+1):(i+2000)]*data$UKX[(i+1):(i+2000)]-1000

Key words in “Quantitative Analyst” job postings

By Dongliang “Larry” Yi

Objective: To find most required skills/abilities related to the job of “Quantitative Analyst”

Total Job postings: 13 (Citi, Morgan Stanley, US Bank, Fitch, S&P, Bloomberg, BoA)

Most mentioned skills/abilities:

Programing Skills: 12 times
            C++: specifically mentioned 7 times

Thursday, July 7, 2016

Key words in “Risk Analyst” job postings



By Dongliang “Larry” Yi


Objective: To find most required skills/abilities related to the job of “Risk Analyst”

Total number of Job postings: 7 (from Goldman Sachs, Morgan Stanley, US Bank and Citi)

Most mentioned skills/abilities:

Programing Skills: 7 times
            C++: specifically mentioned 4 times

Wednesday, July 6, 2016

Sunday, July 3, 2016

Securities Valuation through NGARCH(1,1), DCC(1,1) and Monte Carlo (in R)

By Dongliang “Larry” Yi

In this article, I used NGARCH(1,1) and DCC(1,1) in correlation and variance prediction of every two indexes’ daily return, then I used Monte Carlo in generating a new daily return. I repeated this process many times and get a prediction of two indexes at Aug. 10th 2015. The current day is Aug. 5th 2014.

1.    Securities for pricing