# Blog

## Compute Jackknife Coefficient Estimates in SAS

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.

## Python Shared Memory in Multiprocessing

Python 3.8 introduced a new module multiprocessing.shared_memory that provides shared memory for direct access across processes. My test shows that it significantly reduces the memory usage, which also speeds up the program by reducing the costs of copying and moving things around.1

## Textual Analysis on SEC Filings

Nowadays top journals favour more granular studies. Sometimes it's useful to dig into the raw SEC filings and perform textual analysis. This note documents how I download all historical SEC filings via EDGAR and conduct some textual analyses.

## Variance Ratio Test - Lo and MacKinlay (1988)

A simple test for the random walk hypothesis of prices and efficient market.

## Minimum Variance Hedge Ratio

This note briefly explains what's the minimum variance hedge ratio and how to derive it in a cross hedge, where the asset to be hedged is not the same as underlying asset.

## Winsorization in SAS

These are two versions of winsorization in SAS, of which I recommend the first one.

## Call Option Value from Two Approaches

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

## Bank Holing Company Financials from FR Y-9C

A SAS macro used to extract BHC data.

## Merge Compustat and CRSP

Using the CRSP/Compustat Merged Database (CCM) to extract data is one of the fundamental steps in most finance studies. Here I document several SAS programs for annual, quarterly and monthly data, inspired by and adapted from several examples from the WRDS.1

## Reconciliation of Black-Scholes Variants

This note is just to show that the different variants of Black-Scholes formula in textbook and tutorial solutions are in fact the same.