Tag Info

Usage of Random forests in Quantitative analysis of stocks

Recently I attended a presentation by the first author of the following paper who gave us quite a creative and illuminating (kind of meta-)use of random forests in Quant Finance: All that Glitters Is ...
• 27.4k
Accepted

1) Why would you trade the error on the residual instead of creating a long/short factor model and trade expected returns? I would posit that the biggest reason people do this is for orthogonality of ...
• 456
Accepted

Does Chan use the wrong state transition model in his Kalman filter code?

In addition to getting the right transition model for the Kalman filter, the main obstacle to optimizing filter performance is to implement an optimal initialization. I use an iterative approach to ...
• 361
Accepted

What is the total correlation between assets in a portfolio?

This is indeed an interesting question. According to this website, a paper by Goldman Sachs [Tierens and Anadu (2004)] proposes three alternative methods for estimating average stock correlations: ...
• 27.4k

Implied Volatility of stock on Think or Swim

What they gave you is Newton's formula. If you have a function $f(x)$ then you can find the value $x_0$ such that $f(x_0) = 0$ by this method. It uses the derivative $f'$ which in your case is the ...
• 13.7k

What is the total correlation between assets in a portfolio?

I just want to add to vonjd's answer some info on the comparison of the 3 methods. This is too big for a comment so I'm posting as a separate answer but please upvote his answer, not mine. Do the ...
• 741
Accepted

Creating a Covariance Matrix

here is how to get covariance matrix from correlations:

What color financial time series are there?

Bonus question: Does anyone know how to play/hear a (financial) time series recorded as a pandas series, dataframe, python list, numpy array, csv/txt file,... ? This is kind of fun and has practical ...
• 4,338
Accepted

Fama MacBeth cross-sectional Regression

Preliminary The main result of the Fama-MacBeth procedure is to calculate standard errors that correct for cross-sectional correlation in a panel. It is a commonly used method due to it's easily ...
• 2,916

Quantitative finance for physicists

Physicists typically know PDEs but not stochastic calculus I have a masters in physics, so have a reasonable idea of the usual skillsets a physicist will know (at least at undergraduate level), and ...
• 1,389
Accepted

Is it always better to use the entire distribution of a financial returns series, not just $\mu$ and $\sigma$?

It depends. For example, if you're doing option pricing in the log normal world returns are completely described by the mean and standard deviation. If you add jumps, you would also need to ...
• 8,552
Accepted

• 3,680

Implied Volatility of stock on Think or Swim

Richard's answer is the correct answer to a slightly different question. I think what youâ€™re asking for is the weighted average option implied volatility for a stock. The implied volatility of a ...
• 2,995
Accepted

Implementation of Maximum Drawdown in python working directly with returns

You are missing a few things. The function below assumes that returns is either a pandas series or a column of a pandas dataframe. Try this: ...
• 4,338

Fat tailed can be estimated through a t-distributions?

B is the correct choice. I honestly would wish multiple choice would not even exist. It is the worst way of testing knowledge in my opinion. Without knowing the details of what was taught, I would say ...
• 8,739
Accepted

How to identify daily returns as an unusual daily return given a dataset

Given you have your returns $$r_t = \frac{P_t - P_{t-1}}{P_{t-1}}$$ you can compute the absolute z-score as $$Z_t = \frac{r_t-\mu(r)}{\sigma(r)}$$ where $\mu(r)$ and $\sigma(r)$ are the mean and ...
• 8,739

Central limit theorem and normality assumption of asset return distribution

No. I just published a paper on this. If return is defined as $$r_t=\frac{p_{t+1}q_{t+1}}{p_tq_t},$$ and since returns are not data while prices and volumes are, then it follows that the ...
• 4,299

Where can I find ideas for strategies?

There are lots of different sources out there where you can find various quantitative strategies. Usually, different blog aggregators like https://www.r-bloggers.com post on their websites ...
• 1,840

• 5,672

Asset return distribution

In the Black Scholes (1973) model, the stock price is assumed to follow a geometric Brownian motion $\mathrm{d}S_t=S_t\mu \mathrm{d}t + S_t \sigma \mathrm{d}W_t$. If you solve the SDE, $(S_t)$ is log-...
• 15.9k
Accepted

PCA FOR STOCK PICKING

The first observation I make is that the proportion of variance is not very high for the first PCs, with the implication that I would hypothesise that the PCs are not very stable, nor reliable. (You ...
• 10.2k

Fama/Macbeth Regression - negative estimate for market premium

It sounds like you have estimated a bunch of $\beta$s for excess returns $R_i=r_i-r_f$ and $R_M=r_M-r_f$ above the risk-free rate $r_f$ -- and then run the following model:  \bar{R}_i = \gamma_0 + \...
• 2,900

How to use autocorrelation plot to interpret time series data?

Just by looking at the graphs, I'd say: Unit root Constant series Seasonality AR model No AC No AC
• 717

Issues making series stationary

Your shift is in the wrong direction. Do this: df.price = pd.to_numeric(df.price) df['logret'] = np.log(df.price/df.price.shift(1))
• 750