15
votes
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 ...
12
votes
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 ...
11
votes
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:
...
10
votes
Accepted
statistical arbitrage vs factor trading
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 ...
10
votes
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 ...
8
votes
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 ...
8
votes
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 ...
6
votes
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 ...
6
votes
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 ...
5
votes
Accepted
What are the assumptions in the first-stage of Fama-MacBeth (1973)?
The CAPM is an economic theory that expected returns in excess of the risk free rate should be linear in the regression beta on the market.
$$ \operatorname{E}[R_i - R^f] = \beta_i \operatorname{E}[R^...
5
votes
Basic question on Portfolio Theory
Of course estimating expected returns is the very core of portfolio management. Finding a useful covariance matrix too. To find both fills a book. So I first thought about closing the question. But it ...
5
votes
Accepted
Variable Drift Ornstein–Uhlenbeck Process
You can just take expectations on both sides of your SDE/corresponding integral equation and obtain an ODE on the expectation function $m_t = \Bbb E[x_t]$:
$$
\dot m = \theta(f - m)
$$
which you ...
5
votes
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 ...
5
votes
Accepted
5
votes
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
votes
Accepted
Value at Risk - What if an account has never suffered from a negative return
By definition, your loss cannot be positive, so you'd set the VaR to zero.
But it really depends, on how you calculate your VaR.
If you calculate your returns, sort them and look at the 5% quantile (...
4
votes
Accepted
Basic question on Portfolio Theory
Theoretically speaking (as it's done in financial textbooks at b-school level), variance and covariance are calculated on historical performance of asset classes, forward looking returns are CAPM ...
4
votes
CAPM Calculations
The question above looks somewhat confused. Where's the error term?
A recipe for a standard calculation
It's customary to work with monthly returns.
For each portfolio $i$, calculate monthly ...
4
votes
Accepted
What are the advantages of financial modelling in R?
It is very hard to answer this quiz as people might be good at different at tools. For example, if you are good at VBA, then you can achieve the same effect compared to R in most cases. The following ...
4
votes
Variable Drift Ornstein–Uhlenbeck Process
For the general solution in the case where $f$ is not a constant, note that, from the SDE
\begin{align*}
dx_t = \theta(f(t)-x_t)dt + \sigma dW_t,
\end{align*}
we obtain that
\begin{align*}
d\big(e^{\...
4
votes
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 ...
4
votes
Accepted
Does longer time horizon necessarily imply reduced risk?
It depends upon how you define risk.
Assume a constant, positive equity risk premium and an equity index following geometric Brownian motion (GBM):
$$d \log S_t = \mu \, dt + \sigma \, dZ_t = (\hat{\...
4
votes
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 ...
4
votes
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 ...
3
votes
What are the advantages of financial modelling in R?
Some advantages of R over Excel:
R is a scripting language, which allows to record a data manipulation script once and reuse it multiple times.
R, as a [scripting] programming language is much more ...
3
votes
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 ...
3
votes
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 ...
3
votes
Utility functions, are they used in the real world by hedge funds, banks, etc?
See also utility indifference pricing (Henderson, V., & Hobson, D. (2004) Utility Indifference Pricing - An Overview http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.321.994&rep=rep1&...
3
votes
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-...
3
votes
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
statistical-finance × 173statistics × 46
finance-mathematics × 33
finance × 21
quant-trading-strategies × 19
time-series × 17
portfolio-optimization × 12
programming × 10
financial-engineering × 10
econometrics × 9
equities × 7
correlation × 7
regression × 7
returns × 6
quants × 6
volatility × 5
black-scholes × 5
stochastic-processes × 5
stochastic-calculus × 5
modern-portfolio-theory × 5
capm × 5
asset-returns × 5
statistical-significance × 5
portfolio-management × 4
garch × 4