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