• ## Stock Price Simulation

In this post, I'll introduce four stochastic processes commonly used to simulate stock prices. Formulation and Python implementation are presented one by one, with brief comments afterwards.

• ## Content Filtering with Hexo Tipue-Search Engine

It's always been a headache to me that I cannot have my blog's search engine to show content I want — there're always something you don't want 'em to show up in a search result, like password protected posts (shown as encrypted codes) and random pages for a certain project (some even don't have a title, and this tipue-search would still show them in the searching result — with a blank title and a bunch of html raw codes). Even worse, it seems there's no offical way to set this sort of content filters. This feels bad. This terrible feeling has tortured me for months till I made up my mind and fixed it from source codes today.

• ## Revert GitHub Commit History?

There is a piece of nicely given advice I'd like to share with you: do never post anything too large on your Hexo blog.

• ## Animation in Matplotlib?

In this tiny piece of post I'm gonna post how you can make animations using the matplotlib module in Python. Things get much more intuitive when they move, don't they?

• ## How to Get Variable Name as a String in Python

Although it's not recomended, people sometimes need the variable names. For example, you want to automate the process of generating a dictionary with variable names as keys, or use variable names as columns names in a pandas dataframe. How are we gonna implement this in Python?

• ## The Perfect Market Maker: Is it Possible?

In this research report we try to simulate and explore difference scenarios for a "perfect" market maker in the Bitcoin market. By "perfect" we refer to the capability to capture all spreads on the right side of any trade, i.e. there will be no spread loss at all. Although this setting is too perfect to be considered comparable with real trading, our analysis w.r.t. model parameters are believed to be insightful still.

In this strategy we try to do spread trading based on the M-day (adjusted) returns of two highly related ETFs (exchange-traded funds). The intuition is to hedge the one-sided risks of buy-and-holding one specific ETF with (in expectation) increasing returns, by holding an opposite position of another ETF with decreasing returns. Once we have that the two ETFs' returns are highly correlated, we can trade and make profit by this sort of pair trading.

• ## Bad Interpreter Error of Jupyter and its Solution

After messing up with my Python virtualenv my computer finally started going nuts. Jupyter notebook threw me the following error every time I start it:

• ## Texas Hold 'em Series: Poker Game (w/ GUI)

I wrote a poker game.

• ## Texas Hold 'em Series: Hand Evaluation

In the previous post, we considered the probabilities of making one specific hand with the turn/river card. This can be rather useful in specific situations, but still cannot apply thoughout a game. Poker is essentially an incomplete information game. Different from Go, where you can see all stones placed on the chessboard and thereby "solve" an optimal move, you never know you opponents' pocket cards until showdown (yet even then, people mucks). Also, you have little clue on the unshown community cards. Therefore, in order to evaluate a hand during a poker game, we'd better opt for a online evaluation algorithm instead of considering this as a DP-like problem.