Posts

Endless Terrain Generation in Unity

Jun 18, 2019

Recently I’ve been enjoying a particular YouTube channel or YouTuber named Sebastian Lague, specifically his playlist of Procedural Terrain Generation. It’s absolutely one of the best tutorials explaining how to programatically generate a 3D (endless) terrain mesh, and I really love his approach in working through the C# coding and optimization. Now it’s officially one of my many side projects to replicate his work (he does provide the source code on GitHub! ...

Accumulator Option Pricing

May 29, 2019
Option Pricing

An accumulator is a financial derivative that is sometimes known as “I kill you later". This post attempts to explain how it is structured and price it via Monte Carlo simulations in Python. 1. Overview of Accumulator Like all derivatives, there are two parties invovled in an accumulator, the buyer and the seller, both agree on a strike price that is usually at a discount to the prevailing market price of the underlying security at the time of contract origination. ...

Never Use a Brain Wallet

May 22, 2019
Python, Bitcoin

Among many reasons why people find it hard to use cryptocurrency there’s a simple one – memorising the private key is too hard. So, people invented brain wallet, which turns a string of words into a private key and thus wallet. It’s genius in that now a user needs only to memorise whatever he or she used to create the wallet. You can turn your name, phone number, DoB, favourite quote, lover’s home address, …, literally anything into a cryptocurrency wallet. ...

Computing Jackknifed Coefficient Estimates in SAS

May 20, 2019
WRDS/SAS Tutorial
SAS, Jackknifed Coefficient, Discretionary Accruals

Background In certain scenarios, we want to estimate a model’s parameters on the sample for each observation with itself excluded. This can be achieved by estimating the model repeatedly on the leave-one-out samples but is very inefficient. If we estimate the model on the full sample, however, the coefficient estimates will certainly be biased. Thankfully, we have the Jackknife method to correct for the bias, which produces the (Jackknifed) coefficient estimates for each observation. ...

The Valuable Cheap Privacy

May 19, 2019
Privacy

Recently I’ve been in a project on Australian small loan market. Some fund managers and industry stakeholders actually pointed out some very intriguing perspectives when talking about this small loan business in emerging and developed countries. One that I’m interested in is the value of privacy, to the individual and to the business. The small loan business First, we need to acknowledge that there’s long been the demand for small loans. ...

From Adrian-Gao.com to Mingze-Gao.com

May 18, 2019

I’m changing the site primary domain from adrian-gao.com to mingze-gao.com for some reasons. No Name Shame Mingze, 铭míng泽zé, is my official given name translated from Mandarin. I know that it’s hard to pronounce for native English speakers and it’s honestly nobody’s fault – you’ve to admit that there is simply no such syllable in English that correspond to its correct pronunciation in Mandarin. Though I cannot make it right for a lot of names as well, I dislike as much as everyone else does when people say my name in a strange way. ...

年轻人,养老金了解一下?

Mar 29, 2019

二十岁刚出头的小伙子小姑娘们可能还在拿着压岁钱,赡养自己的父母可能还没仔细想过,更别提养自己的老了。不过,你真的应该了解一下养老金这东西。虽然好像是几十年以后才能用的东西,但也正是这几十年的时间会让你那时生活变得大大不同。

...

Call Option Value from Two Approaches

Mar 17, 2019
Option Pricing

Suppose today the stock price is $S$ and in one year time, the stock price could be either $S_1$ or $S_2$. You hold an European call option on this stock with an exercise price of $X=S$, where $S_1<X<S_2$ for simplicity. So you’ll exercise the call when the stock price turns out to be $S_2$ and leave it unexercised if $S_1$. 1. Replicating Portfolio Approach Case 1 Case 2 Stock Price $S_1$ $S_2$ Option: 1 Call of cost $c$ Exercise? ...