Questions tagged [programming]

For questions about programming languages, implementation, and packages in quantitative finance. Note: question must be specific to quantitative finance and must necessitate knowledge of quantitative finance in order to be on topic.

Filter by
Sorted by
Tagged with
75 votes
8 answers
33k views

Is R being replaced by Python at quant desks?

I know the title sounds a little extreme but I wonder whether R is phased out by a lot of quant desks at sell side banks as well as hedge funds in favor of Python. I get the impression that with ...
Matt Wolf's user avatar
  • 14.4k
63 votes
21 answers
58k views

Is there any thing out there as a substitute for KDB?

thanks a lot for your discussions on the original post. following your suggestions, let me re-phrase a bit : kdb is known for its efficiency, and such efficiency comes at a terrible price. However, ...
Peter Peter's user avatar
60 votes
13 answers
25k views

Switching from C++ to R - limitations/applications

I've only recently begun exploring and learning R (especially since Dirk recommended RStudio and a lot of people in here speak highly of R). I'm rather C(++) oriented, so it got me thinking - what are ...
Karol J. Piczak's user avatar
50 votes
12 answers
61k views

Why is C++ still a very popular language in quantitative finance? [closed]

I had to ask this question after reading the answers to What programming languages are most commonly used in quantitative finance? I understand that C++ programs can be optimized pretty well and are ...
Tae-Sung Shin's user avatar
47 votes
14 answers
35k views

Except Zipline, are there any other Pythonic algorithmic trading library I can choose?

Except Zipline, are there any other Pythonic algorithmic trading library I can choose? Especially, for backtesting? Update: Since Quantopian closed, there are some Zipline forks like: https://pypi....
Terence Ng's user avatar
44 votes
9 answers
21k views

What tools exist for order book analysis and visualization?

What tools exist for order book analysis and visualization? In particular, if one wanted to examine a limit order book and understand how it changes throughout the day where would you turn for ...
Louis Marascio's user avatar
36 votes
13 answers
12k views

Is F# used in trading systems?

Similar to this other question about Scala, I'm interested in knowing whether F# is used to any measurable degree in financial circles. Have there been any successful shops using it, any research on ...
Joel Martinez's user avatar
33 votes
5 answers
14k views

What is a good broker for HFT?

Currently I trade trough IB. I run my HFT strategies (100 roundtrips per hour) but I think that latency is killing me and my profits are shrinking. I need the fastest possible brokers out there which ...
user40's user avatar
  • 2,687
32 votes
4 answers
28k views

How to derive the implied probability distribution from B-S volatilities?

The general problem I have is visualization of the implied distribution of returns of a currency pair. I usually use QQplots for historical returns, so for example versus the normal distribution: ...
Thomas Browne's user avatar
31 votes
2 answers
29k views

Correctly applying GARCH in Python

Problem: Correct usage of GARCH(1,1) Aim of research: Forecasting volatility/variance. Tools used: Python Instrument: SPX (specifically adjusted close prices) Reference material: On Estimation of ...
WGS's user avatar
  • 313
28 votes
9 answers
6k views

How good is managed code for algo trading?

I am currently working in a firm that does algo trading. We do all of our stuff in Java. And we do make money out of it. We have debates all the time whether we would have made more money with native ...
Bick's user avatar
  • 613
28 votes
13 answers
21k views

What is the reference python library for portfolio optimization?

Does anyone know of a python library/source that is able to calculate the traditional mean-variance portfolio? To press my luck, any resources where the library/source also contains functions such as ...
Gabe's user avatar
  • 381
27 votes
17 answers
92k views

What programming languages are most commonly used in quantitative finance?

What programming languages are the most common in quantitative finance, and why are these languages used? Note: I do not mean, what languages are used to develop the accounting system at a hedge fund:...
27 votes
8 answers
5k views

What kind of basic framework or application do you use to run your trading algorithms?

I heard about MetaTrader from http://www.metaquotes.net. Is there any other framework or program available? Do you use different software for backtracking and running your trading algorithms? Thank ...
25 votes
5 answers
10k views

Implementing data-structures in a Limit order book

I'm working on implementing a 'LOB' and I'm being very careful about choosing my data-structures so as to maximize performance. Using F# as an example, I need to consider a List versus Array for ...
jordan.baucke's user avatar
24 votes
7 answers
34k views

Is the Interactive Brokers API suitable for hft?

By HFT here I mean anything with holding period less than 5 to 10 minutes. Any empirical/anecdotal evidence of using it successfully on even higher frequencies?
user40's user avatar
  • 2,687
24 votes
3 answers
5k views

Tools in R for estimating time-varying copulas?

Are there libraries in R for estimating time-varying joint distributions via copulas? Hedibert Lopes has an excellent paper on the topic here. I know there is an existing packaged called copula but ...
Ram Ahluwalia's user avatar
23 votes
6 answers
68k views

How to fit ARMA+GARCH Model In R?

I am currently working on ARMA+GARCH model using R. I am looking out for example which explain step by step explanation for fitting this model in R. I have time series which is stationary and I am ...
Add's user avatar
  • 1,397
22 votes
5 answers
10k views

Which Algorithmic trading library would you recommend for trading Bitcoin?

I am starting to do Algorithmic trading in cryptocurrencies using Python libraries. Most exchanges have RESTful API that make it easy to write you own code and get started. However, I would like to ...
fccoelho's user avatar
  • 319
21 votes
3 answers
9k views

Is there an all Java options-pricing library (preferably open source) besides jquantlib?

I am looking for an all-java implementation of black scholes, preferably open source. I found jquantlib and quantlib (C++). Any other recommendations? The jquantlib site seems to be down. I'd prefer ...
colin's user avatar
  • 249
19 votes
3 answers
9k views

R: How feasible is it to store -- and work with -- tick data in a database connected to R?

I'm looking to convert some tickdata .csv files into a database on a local disk and then use R to call the data and do my various analytics and modelling. What are some best practices / ...
n.e.w's user avatar
  • 437
18 votes
7 answers
97k views

Calculating log returns using R

I am trying to calculate the log returns of a dataset in R using the usual log differencing method. However, the calculated data is simply a vector of zeroes. I can't see what I'm doing wrong. Here ...
Homunculus Reticulli's user avatar
18 votes
4 answers
14k views

R code for Ornstein-Uhlenbeck process

Can any one help me with some R code to run Ornstein-Uhlenbeck process?
Add's user avatar
  • 1,397
18 votes
1 answer
28k views

Forecasting using rugarch package

I want to do one step ahead in-sample forecasts. My data can be found here. This is just a data frame with the date as the rownames. I specify my model and do the fit and show the plots with ...
Stat Tistician's user avatar
18 votes
1 answer
14k views

What is the best live options data API?

What is the best/cheapest service to get real-time (as real-time as you can get) on stock options? I'm looking for the fastest update on the ENTIRE market, with a few stocks prioritized, so I need ...
David Menard's user avatar
17 votes
7 answers
8k views

What C++ math libraries are typically used by quants?

Before you mark question as off-topic, please read it - it is, actually, quant-related. Basically, I'm working on an app that spits out a lot of C++ math. When it comes to simple things like ...
Dmitri Nesteruk's user avatar
17 votes
3 answers
7k views

Hidden Markov Model & Its Application

I have started reading about HMM it gives an intuitive idea about what HMM is all about. I am looking out for example where its applied to Equity model using R / Excel. The material which I read so ...
Add's user avatar
  • 1,397
17 votes
2 answers
7k views

Is there a website that lists replication code of financial papers?

There are lot of questions on this website related to the replication of the empirical part of financial papers. I noticed that some (honest) authors provide on their personal website some ...
Malick's user avatar
  • 2,552
17 votes
3 answers
2k views

Simulating Returns

I'll start this off with a rather broad question: I am trying to simulate returns of a large number of assets within a portfolio of different classes - equity and fixed income in a first step, say 100 ...
Owe Jessen's user avatar
  • 1,134
16 votes
2 answers
11k views

What time series database can be used with Python and Pandas?

I'm looking for a time series database that can be easily used with Python and Pandas objects such as DataFrame, Panel... But these objects will always contains time series. Ideally I'm looking for ...
Femto Trader's user avatar
16 votes
2 answers
3k views

Drawbacks & Caveats of using (N)Esper for ESP/CEP in trading systems?

Esper and its .NET port NEsper are components that enable Complex Event Processing (CEP) and Event Stream Processing (ESP) engines. They are especially suitable for trading applications. They can, ...
Joseph Tanenbaum's user avatar
15 votes
4 answers
15k views

Trading C++ Libraries

Are there any free c++ libraries that would have some of the functions that would be used in developing a trading strategy. For instance, calculating drawdown, Volatility Forecasting, MAE, MFE....etc. ...
sharpeRatio's user avatar
14 votes
4 answers
2k views

Statistical learning libraries

Is there a general (or specialised) FREE library to solve learning problems such that found in the book "The Elements of statistical Learning". As it is often time consuming to write all the ...
Zarbouzou's user avatar
  • 2,283
14 votes
6 answers
8k views

Library of basic indicators

I am looking to start developing a trend following strategy and have been looking to do something in either C# or Java and wondered if there was a library or framework out there that would make ...
MJB's user avatar
  • 161
14 votes
4 answers
10k views

R: Fast and efficient way of running a multivariate regression across a (really) large panel (First pass of Fama MacBeth)

I am attempting to run a rolling multivariate regression (14 explanatory variables) across a panel of 5000 stocks: For each of the 5000 stocks, I run 284 regressions (by rolling over my sample period)...
Mayou's user avatar
  • 662
14 votes
2 answers
1k views

Are there any tools or useful algos for identifying corner portfolios?

Let's say I am performing mean-variance optimization subject to some weight constraints. I'd like to identify the set of corner portfolios so that I can interpolate the entire efficient frontier. A ...
Ram Ahluwalia's user avatar
14 votes
1 answer
811 views

Has any research used Bayesian networks to estimate risk factor betas?

Is there any published research on estimating the beta of a security with respect to one or more risk factors via Bayesian networks? I'd like to see if this is a promising angle of research.
Ram Ahluwalia's user avatar
14 votes
2 answers
22k views

GARCH model and prediction

I have a question about the prediction of volatility and returns of a time series. Basically it is a question about predict in the ...
math's user avatar
  • 1,718
14 votes
1 answer
1k views

Is creating constrained random portfolios a hard problem?

Creating random portfolios with weights $x_i$ can be thought of as sampling from the surface of a simplex given by $$Ex = f$$ and $$Ax \le b$$ Where $E$ and $A$ are constraint matrices for equality ...
Mike Flynn's user avatar
13 votes
7 answers
14k views

Which brokers offer a .NET stock trading API?

I'm trying to make up my mind and choose a broker, however much of my choice depends on the trading API offered. I'm definitely not interested in FIX solutions and I'd very much like a .NET ...
em70's user avatar
  • 345
13 votes
4 answers
2k views

What approaches are there to order handling in automated trading?

I am currently developing a commercial automated trading program in which users can write their own proprietary code and develop strategies, like in NinjaTrader, MetaTrader etc. Right now I am working ...
ali_bahoo's user avatar
  • 1,149
13 votes
4 answers
959 views

Reference request: Survey article on GPU in Finance

I would like to get and idea of how people use GPUs in finance. I can find some specific papers or books on the subject. GPUs in binomial model, finite difference, monte carlo,... But I couldn't ...
user avatar
13 votes
1 answer
2k views

Does your Parkinson volatility ratio work as Taleb explained?

According to Dynamic Hedging: Managing Vanilla and Exotic Options (Taleb, 1997), the Parkison volatility estimator has several meaningful properties. It is defined $$P=\sqrt{\frac{1}{n}\sum_{i=1}^{n}\...
Lisa Ann's user avatar
  • 2,111
13 votes
4 answers
2k views

What commercial financial libraries are available to outsource implementation risk?

During our daily jobs as quants, we tend to be willing to develop all the quantitative libraries ourselves. While I know that we need to develop specific algorithms which are the foundations of our ...
SRKX's user avatar
  • 11.1k
13 votes
3 answers
5k views

Can the J language be used as an effective alternative to Q/Kdb+?

I hear a lot about Q/kdb+. I've never had the opportunity to use it for anything real but have played with it using their trial license and found it intriguing (if not somewhat mind warping). I've ...
Louis Marascio's user avatar
13 votes
2 answers
1k views

Imposing Restrictions on Cointegrating Vectors, R example

The code given below estimates a VEC model with 4 cointegrating vectors. It is a reproducible code, so just copy and paste into your R console (or script editor). ...
london's user avatar
  • 191
13 votes
4 answers
3k views

Thesis using Momentum strategies in R, tips on good books, guidelines etc on how to do the programming?

I am quite new to R and will be doing an empirical analysis of momentum strategies in R using a dataset from the index OSEAX from 1980 to 2014. The momentum strategy will for the most part resemble ...
V.kogn's user avatar
  • 131

1
2 3 4 5
35