48 votes
Accepted

Is R being replaced by Python at quant desks?

My deal is HFT so what I care about is read/load data from file or DB quickly in memory perform very efficient data-munging operations (group,transform) visualize easily the data I think is is ...
user avatar
  • 1,238
31 votes

Is R being replaced by Python at quant desks?

Instead of wild guesses about R's/python's future in the community, here some facts: The following query on StackExchange Data Explorer counts the number of questions that have ...
user avatar
  • 481
25 votes

Is R being replaced by Python at quant desks?

This is interesting because I see another trend: Matlab is being replaced by R, but I guess this is another story. I use R for my academic (I am also teaching this stuff) as well as my consulting ...
user avatar
  • 26.7k
23 votes

Is R being replaced by Python at quant desks?

I've used both R and Python with Pandas in a professional quantitative financial work to do both large and small scale projects. I would strongly recommend Python with Pandas over R for most new ...
user avatar
  • 1,541
22 votes

How did James Simons clinch that security prices didn't look random?

I'm sure Simons, as a first-rate pure and applied mathematician, had sufficient understanding of statistics to detect market inefficiencies and anomalies. As far as I know, the development and ...
user avatar
  • 3,240
13 votes
Accepted

Why shrink the covariance matrix?

Have a look at this classic paper: Honey, I Shrunk the Sample Covariance Matrix by O. Ledoit and M. Wolf The abstract answers your question already: The central message of this article is that no ...
user avatar
  • 26.7k
13 votes

Is R being replaced by Python at quant desks?

For data analysis, particularly for large data analysis project, pretty much most of the top quant hedge funds and a lot of the banks are using Python (over R) for a couple of reasons but many still ...
user avatar
  • 782
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: ...
user avatar
  • 26.7k
10 votes

How did James Simons clinch that security prices didn't look random?

Jim Simons' initial intuitions about nonrandomness were probably driven by the very psychological/evolutionary predispositions to want to find the hidden meaning within noise that affect humanity in ...
user avatar
9 votes

Should I use an arithmetic or a geometric calculation for the Sharpe Ratio?

I think this is a no-brainer. Only log-returns make sense. The average return can only be computed by averaging the sum of individual log returns. Taking the average of standard (relative) returns ...
user avatar
9 votes

Book recommendation for time series analysis

I would suggest Time Series Analysis by James Douglas Hamilton
9 votes
Accepted

Correlation between stock prices given correlation between returns

We can obtain a closed-form expression for price correlation given (log) return correlation when the two stocks follow geometric Brownian motion: $$S_1(t) = S_1(0)e^{(\mu_1- \frac{1}{2} \sigma_1^2)t}...
user avatar
  • 3,240
8 votes

Calculate correlation between two sub portfolios and the combined portfolio

To clarify notation, you have an universe of $n=2000 \space$ stocks and two portfolio vectors $\mathbf{a},\mathbf{b}\in\mathbb{R}^{n}$ with $\left\|\mathbf{a}\right\|_{1}=\left\|\mathbf{b}\right\|_{1}...
user avatar
8 votes

Why shrink the covariance matrix?

The estimation of a covariance matrix is unstable unless the number of historical observations $T$ is greater than the number of securities $N$ (5000 in your example). Consider that 10 years of data ...
user avatar
  • 3,240
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 ...
user avatar
  • 741
7 votes

Why shrink the covariance matrix?

Transaction costs - even for banks, funds etc, every trade has an associated cost, so if you would be buying a small number of shares, it's probably cheaper to carry the risk and not make those small ...
user avatar
  • 3,589
7 votes

What are the canonical books for statistics applied to finance?

I think a good book to start in your case is: Attilio Meucci: Risk and Asset Allocation I once had a seminar held by Attilio that was based on the book and it blew my mind. The book is very ...
user avatar
  • 26.7k
7 votes

What are the canonical books for statistics applied to finance?

Elements of Statistical Learning by Hastie, Tibshirani and Friedman is one of the most-cited books for your purpose. Although it does not have any direct applications to Finance, this is definitely a ...
user avatar
  • 289
7 votes

Predict the behavior of a time series (P&L trading desk)

Without seeing your trading desk's P&L it's impossible to say whether it is predictable or not. But here are a few thoughts - There's no reason to think that it isn't predictable. In general, ...
user avatar
  • 5,603
6 votes
Accepted

Why do I have a statistically significant slope regressing R(t) on R(t-1)

Why do you have 16180 observations? Is this daily data over 64 years or higher frequency data? I am guessing so by the magnitude of the intercept. At any rate, your test power would be huge with this ...
user avatar
  • 2,084
6 votes

How to fit ARMA+GARCH Model In R?

This should walk you through what you are looking for: https://www.quantstart.com/articles/Generalised-Autoregressive-Conditional-Heteroskedasticity-GARCH-p-q-Models-for-Time-Series-Analysis https://...
user avatar
  • 207
6 votes

How to fit ARMA+GARCH Model In R?

If you wander about the theoretical result of fitting parameters, the book GARCH Models, Structure, Statistical Inference and Financial Applications of FRANCQ and ZAKOIAN provides a step-by-step ...
user avatar
  • 61
6 votes

Kalman Filter Equity Example

The following paper gives you a step-by-step presentation of how to use the Kalman filter in an application in a pricing model framework for a spot and futures market. Everything is explained using ...
user avatar
  • 26.7k
6 votes

Is R being replaced by Python at quant desks?

For the tasks listed, both Python and R perform very well. There are some packages in Python not in R and vice versa. My solution for this is to simply call R from Python. This allows for the best of ...
user avatar
  • 1,968
6 votes

Is R being replaced by Python at quant desks?

Also in the high frequency / medium frequency field here. I received a "mixed" consensus regarding the use of R and its prevalence in the field (specifically HFT). Speaking with someone who works in ...
user avatar
  • 1,132
6 votes
Accepted

How to calculate the JdK RS-Ratio

Reading what I have, I can only offer a guess. 1: Let's say you're looking at 9 sectors compared to \$SPX on a daily chart. Foreach sector, compute relative closing price: 100 * Sector/\$SPX 2: It ...
user avatar
  • 76
6 votes
Accepted

Interpreting Eigenvalues of Co-variance Matrix

What you basically do here is a Principal Component Analysis (PCA). A good starting point in the financial sphere is Managing Diversification by Attilio Meucci (2010) Page 3: "The most natural ...
user avatar
  • 26.7k
6 votes

How did James Simons clinch that security prices didn't look random?

I will disagree with RPL's answer - Simons is not particularly known as an applied mathematician, but he did work for some time at the Institute for Defense Analysis [IDA] (he was fired for ...
user avatar
6 votes
Accepted

Shrinkage of the Sample Covariance matrix, theory

Yes. It comes from a core theorem of statics, Stein's Lemma. It shook the foundations of the field of statistics when it came out. It blew up an entire way of viewing mathematical statistics. ...
user avatar
  • 3,976
5 votes

Why shrink the covariance matrix?

Go ahead and compute a sample covariance matrix with 5,000 stocks on a few years (or less) of daily or monthly returns data. This can be done almost instantly on a modern computer. There is a very ...
user avatar
  • 537

Only top scored, non community-wiki answers of a minimum length are eligible