# Month: October 2013

# Fwd: comparing exp( (a+b)/2 ) vs 0.5 exp(a) + 0.5 exp(b)

—

Hi Richard (Qu Miao),

# negative beta, sharpe, treynor

corr=1 means perfect positive corr, but doesn't tell us whether a 1 unit increase in X causes a 0.001 or 1000 units increase in Y.

When we compare returns of a fund or stock vs a stock index, we are interested in the relative size of change or “magnifying

effect”. Beta helps here.

A “normal” beta close to 1.0 means when mkt grows[1] 5%, then ibm also grows about 5%. Note this growth is fast-changing. All prices

are volatile. As shown in other posts on beta, many other CAPM variables are not volatile, but could be slow-changing.

[1] assumeing low risk-free rate, so excess return and “return” are practically no-different.

A large beta like 1.5 is more volatile. A “magnifier” stock such as tech stocks. A 5% drop in the index is likely to see a 7.5% drop

in this asset.

Beta < 1 means a "stable" stock that moves in-sync with the market but at very low magnitude.

Negative beta means short positions or something else.

—

A negative Sharpe ratio indicates your fund underperforms risk-less asset (like a gov bond in your fund's currency). The denominator

(std of the fund return), be it large or small, isn't responsible for this negativity.

—

Treynor Ratio is negative if

case1: if beta is positive, then fund underperforming risk-free rate.

case2: if beta is negative, then fund outperforming risk-free rate. This means that the fund manger has performed well, managing to

reduce risk but getting a return better than the risk free rate

# risk-neutral probability – basics

Simplest defining example of RNP : say a coin flip pays $1mil if H and 0 if T and the consensus market price is $400k. The RN prob inferred from the market prices is Pr(H) = 40%.

We don’t know the physical prob. We assume the market price is a fair price, so we use the implied RN Prob as a fair estimate of the physical prob.

What if we know (via the coin manufacturer) the physical prob is 50/50? Well, the real people composing the market are risk averse so they are only willing to pay, in general, 400k. I guess the RNP is still 40%. In financial markets I don’t think anyone knows the physical prob. The most reliable way to estimate the physical prob is through the RNP.

Another defining example of RNP: (Roger’s P 2.28) Stock value at T1 is 115, and at Termination can rise to 150 or drop to 100. Using just these 3 numbers and 1 interval, we can derive the RNP(up | S=115 at T1). To keep things simple, we will assume the market has a consensus on the probabilities of up/down.

Next, wrap your mind around this unusual condition — that the terminal value ($150 and $100) are fixed and at Termination the stock cannot take on any value in between. This is like a coin or dice. The only unknown is the probability, not the possible values.

We can therefore infer RN P(up) = 30% as if all traders in the market all agreed on this 30%.

Note the current price of 115 is result of market adjusting to any new info. We can say the current price already reflect the RN P(up)

In the original example, at T1 the stock can also reach $75. On this branch of the tree, the Termination value is either 100 or 50. The RN P(up | S = 75 at T1) = 50%, different from the 30%.

This is another important feature of this model – the RNP depends not only on the stage we are at, but also on the information revealed so far. You can imagine the noisegen is adaptive.

# professional option traders

Professionals sell calls and puts. (Retail investors buys them.). These are “High probability” trades, i.e. high chance of profit. Given this zero-sum game, it follows that the option-buyers do low-probability trades. This isn't a risk-neutral world. Retail is risk-averse.

There are real risks that the option could get exercised, so the option sellers always need some protection.

# compressed content in a http response

Now I feel an http response may be a zip containing multiple files. The response “body” will be an compressed bytes array. (To avoid confusion, I will call this a “zip” rather than a “file”.) When you parse these bytes, you may see multiple zip entries.

If you assume the entire zip is a single file and try to decompress/deflate it, it might fail. The output may be empty.

The http response also contains useful response headers. One of the headers would be content-type. The gzip and zip types seem to require different parsers.

# iid assumption in cumulative return

Time diversification? First look at asset diversification. Split $200k into 2 uncorrelated investments so when one is down, the other might be up. Time-div assumes we could add up the log returns of perod1 and period2. Since the 2 values are two N@Ts and very likely non-perfectly-correlated (i.e. corr < 1.0), one of them might cushion the other.

Background — the end-to-end (log) return over 30 years is (by construction) sum of 30 annual returns —

r_0to1 is a N@T from noisgen1 with mu and sigma

r_1to2 is a N@T from noisgen2.

…

r_29to30 is a N@T

So the sum r_0to30 (denoted r) is also a random var with a distribution. Without assuming normality of noisegen1, if the 30 random variables are IID, then the sum would follow a normal distribution with E(r) = 30mu and stdev(r) = sigma * sqrt(30)

This is a very important and widely used result, at the heart of a lot of quizzes, a lot of financial data. However, the underlying IID assumption is controversial.

* The indep assumption is not too wrong. Stock return today is not highly correlated with yesterday's. Still AR(1) models include preceding period's return …. Harmless.

* The ident assumption is more problematic. We can't go back in time to run the noisegen1 again, but there are data to prove that the ident assumption is not supported by real data.

Here's my suggestion to estimate noisegen1's sigma. Look at log return. r_day1to252 = r_day1to2 + r_day2to3 + … + r_day251to252. Assuming the 252 daily return values are a sample of a single noisegenD, we can estimate noisegenD's mean and stdev, then derive the stdev of r_day1to252. This stdev is the stdev of noisegen1.

# hetero-skeda-sticity, another example

“the dispersion among expenditure of low-income households is, say, 21.1. The dispersion among high-income households is that same value. Here we mean the dispersion among the residual values i.e. the unexplained portion of expenditure.”

Note this is an assumption about the population not a sample. Suppose 5 income levels. A small sample having just 2 households per level (10 households in entire sample) will be too small, and is very likely to show inconsistent dispersions at low-income vs high-income.

# bak – strength of correlation

1) One of the first “sound bites” is the covariance vs correlation definitions. I like http://en.wikipedia.org/wiki/Covariance_and_correlation. Between 2 series of data (X and Y), cov can be a very large num (like 580,189,272billion), which can’t possibly reveal the strength of correlation between X and Y. In contrast, the correlation number (say, 0.8) is dimentionless, and

has a value between -1 and 1. This is intuitive.

* highly correlated means close to +1 or -1

* uncorrelated means 0.

2) Below I feel these are 2 similar definitions of the corr. Formally, this number is the Linear correlation between two variables X and

Y.

A) For the entire population,

B) For a sample taken from the population,

B2) The formula above is identical to the r definition on P612 [[Prem Mann]]

B3) An equivalent (equally useful) formula is

3) r-squared is a standard measure of the goodness of a linear regression model

# Fwd: strength of correlation

1) One of the first “sound bites” is the covariance vs correlation definitions. I like http://en.wikipedia.org/wiki/Covariance_and_correlation. Between 2 series of data (X and Y),

**covariance can be a very small or large**num (like 580,189,272billion), which can’t possibly reveal the strength of correlation between X and Y. In contrast, the correlation number (say, 0.8) is

**dimentionless**, and

has a value between -1 and 1. This is intuitive.

* linearly correlated means close to +1 or -1

* uncorrelated means 0. X/Y are

__Independent__

__=> corr = 0__http://en.wikipedia.org/wiki/Correlation_and_dependence shows that perfectly dependent pairs like Y=X^2 could have 0–correlation.)

** independence is sufficient but unnecessary condition for 0 correlation.

** 0 correlation is necessary but insufficient condition for independence.

2) r-squared is a standard measure of the goodness of a linear regression model. In a univariate regression of y on x, r-square is corr

^{2}(x,y). High r-square like 0.99 indicates a large part of Y variation is explained by X.

3) Below I feel these are 2 similar definitions of the corr coeff. Formally, this number is the Linear correlation between two variables X and Y.

A) For the entire population,

B) For a sample taken from the population,

, which is is identical to the r definition on P612 [[Prem Mann]] —

B2) An equally useful formula of SS is

SSx or SSy or SSxy — all similar

^{}