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.

learn more… | top users | synonyms (9)

5
votes
1answer
1k views

Robust Bayesian portfolio optimization in matlab?

I am working through this paper. I want to implement the robust Bayesian optimization (see pages 6 onward) in Matlab using fmincon. Here is a brief overview of my problem: Let $\alpha$ be the ...
5
votes
1answer
84 views

Bloomberg & R: Accessing multiple securities with getBars() in R

I am attempting to access 1 minute trade data for 50 securities using Bloomberg API (rblpapi). Following is the code I got from the CRAN: ...
5
votes
2answers
84 views

What is the best / most used / recommended C++ non-blocking networking library for low-latency / real-time development?

I'm coming from Java and there we use the EPoll selector implementation that comes with the JDK for non-blocking / asynchronous networking TCP and UDP development. Therefore you don't have to make ...
5
votes
5answers
2k views

Library for interactive financial charts

For my recent project I am looking to build a software capable of visualizing financial charts in a dynamically and interactive matter. The workflow is as follows: I gather data from my data ...
5
votes
0answers
263 views

Algorithmic Trading Model Calculation and Stale Data

I'd like ask everyone a more concurrency programming but definitely quant-finance related question. How do you deal with staleness of data in market hours as quote ticks are streaming and your model ...
4
votes
3answers
432 views

How do you handle Calendars in a .NET quant system?

I have developed an analytic platform in .NET, but I now have to tackle the problem of data cleaning which first starts by finding holes in time series, before actually looking to find inconsistent ...
4
votes
2answers
2k views

GJR-GARCH Model In R

Any idea how to estimate GJR-GARCH models in R? Is there any particular library like fGarch that supports such models?
4
votes
3answers
2k views

VaR implementation using quantlib?

I am thinking of writing a VaR framework for my existing system, using quantlib to do the bulk of the calculations. Despite several searches, I have not as yet come across a quantlib VaR ...
4
votes
1answer
2k views

Mersenne twister random number generator in Java for Monte Carlo Sim.

I am using the Mersenne twister random number generator in Java for a Monte Carlo Simulation. I need a uniform distribution of values between -1 and 1. My code is below (I am importing ...
4
votes
1answer
3k views

open-source implementation of orderbook from FAST?

I'm looking for c/c++ implementation of OrderBook. I need implementation to reconstruct market data from FAST. I don't need to do "matching" because it already did by exchange, I only need to ...
4
votes
2answers
2k views

What is the best alternative of Quantlib library

We need to build a Fixed Income Portfolio Risk Analytics solution. Somehow due to administrative reason we can't use Quantlib which is written in C++, even call it through SWIG via JNI. We have tried ...
4
votes
1answer
576 views

Is there any open-source library, implementing “exchange” to be used for algorithms running on the same computer?

Question: Is there any open-source project/library, which can act as a "local exchange" for agents (algorithms), running on the same computer? Clarification: by "local exchange" I mean, that the ...
4
votes
2answers
2k views

Resequencing of MsgSeqNum in FIX 4.2

I am trying to achieve the following functionality using QuickFIX for FIX 4.2 Send a couple of orders and make sure they’re filled. Then disconnect. Change the incoming (from Broker) sequence number ...
4
votes
3answers
1k views

What is an efficient method to find implied volatility?

I have a code that finds the implied volatility using the Newton-Raphson method. I set the number of trial to 1000 but sometimes it fails to converge and doesn't find the result. Is there a better ...
4
votes
2answers
1k views

Looking for C# library that provides/contains performance analytics

I am looking for a C# .Net library that provides trade performance analytics similar to R-PerformanceAnalytics. Basic return statistics, draw-downs, risk-adjusted returns, risk (variations), ...
4
votes
3answers
368 views

How to most optimally perform currency conversions when backtesting on portfolio level?

I am currently expanding my own strategy profiling and testing platform which partly consists of a portfolio backtesting module. The backtest engine processes tick based data (quotes for currencies, ...
4
votes
2answers
2k views

How to implement Maximum Diversification in R?

I am trying to code up the optimization problem for Max Diversification Portfolios. The main problem I am having is properly translating the objective function in to code and port it in to the ...
4
votes
1answer
2k views

What is the best solution to use QuantLib within Excel?

Excel is likely the most widespread instrument across all not-only-quants desks; in addition, we have to keep in mind that Bloomberg and Reuters allow to easily import real time data in Excel, and ...
4
votes
1answer
867 views

Risk-Parity Portfolio Optimization using Extreme Optimization in C#

I'm trying to create a risk-parity portfolio in C# using the Extreme Optimization routines. I'm mostly trying them out to see if I like them or not before I buy them (I'm a student so money is ...
4
votes
3answers
212 views

Technical analysis - Calculating Aroon Indicator Serie

I'm trying to build a class to create Aroon series. But it seems I don't understand the steps well. I'm not sure about what purpose I have to use the period parameter. Here is my first attempt: ...
4
votes
1answer
206 views

Why annualized return and cumultive return aren't equal over 1-year period with Performance Analytics package in R?

I use Performance Analytics package in R to compare annualized and cumulative return of a portfolio. My expectation is that both should be equal over a period of 1-year but results tell me I'm wrong. ...
4
votes
1answer
443 views

Cross Bid and Ask prices for Forex trading

I am using ITCH protocol to get the Market Data information for Forex and trying to implement LOB on it and what i have noticed is that Bid and Ask prices are crossing very often. Should that be ...
4
votes
2answers
245 views

How to trade a Ratio?

I came across a ratio plotting of Corn And Soybeans contracts, notice it's in a historical low, an intuitive question came to my mind, how should I trade this ratio (or relationship)? It's unlike flat ...
4
votes
1answer
150 views

Yahoo finance, interactive chart and historical prices are different

I am very new to the stocks. I checked the TNTE.AS stock on Yahoo Finance website. Here it provides "Interactive Chart" and "Historical Prices". But I found they are showing different values. For ...
4
votes
1answer
477 views

API for after and pre market data

Is there an API or APIs similar to the Yahoo! or Quandl APIs, that give the same access to pre and after market data? I know I can scrape the Nasdaq or Yahoo! Finance sites to get a pre/after market ...
4
votes
2answers
153 views

Implementation of Ledoit Wolf shrinkage estimator within R package tawny

I want to implement the shrinkage intensity given by Ledoit and Wolf, see here page 13. They define $y_{it}$ with $1\le i\le N$ and $1\le t\le t$ be the return on stock $i$ at time $t$. Moreover, ...
4
votes
0answers
114 views

How would it be possible to use Dynamic Programming to search a space of investment strategies to find an optimum?

As my question states, the problem I am having is finding a sensible way to search a large space. Any help or insight that could be provided would be hugely appreciated. Currently I am trying to ...
3
votes
4answers
718 views

How much does a Grid Computing software cost?

So far, I have been performing computations either on my own computer, or using an in-house scheduler that basically chooses a one of the employees' available workstations to run tasks in the ...
3
votes
4answers
1k views

What is the industry standard Quant Finance modeling library for F#

If it exists, has been agreed on, and F# programmers have used it extensively, I would like to know what is the industry standard Quant Finance library for F#. What typical finance scenario(s) have ...
3
votes
2answers
961 views

Covariance for arbitrarily large portfolios

I am implementing a method in Java to calculate the variance, covariance, and value at risk for a portfolio, which should be flexible for use with any number of assets in a portfolio. I am struggling ...
3
votes
3answers
1k views

Treasury Bond Yield Curves in R

Does anyone know if I can access interest rates series from the treasury using R? I tried yahoo! Finance and it doesn't seem to have this kind of information.
3
votes
2answers
182 views

C# - Using Black Scholes Newton returns NaN occasionally

First caveat: I'm a programmer doing this for a client, and my knowledge of options probably has holes in it. So be a little forgiving here. =) The Issue: When I run Black Scholes Newton against ...
3
votes
1answer
920 views

How to sum interest rate curves in QuantLib

C++ code taken from Bonds.cpp and slightly amended: ...
3
votes
1answer
2k views

C++ training from scratch to quantitative trading? [closed]

I have been trading for decades, and I have a solid knowledge of technical analysis but also VB as professional programmer. I would like to start learning C++ from scratch, then specialised in C++ ...
3
votes
1answer
151 views

What is wrong in this GBM simulation?

I am trying to generate a few samples of GBM using the following very simple MATLAB code: ...
3
votes
3answers
6k views

What is the difference between the Interactive Brokers demo account and a personal paper trader account?

I'm interested in testing my trading strategy using the Interactive Brokers API for Trader Workstation. A demo account is provided to play with TWS for free, but if I fund a real account I will be ...
3
votes
2answers
104 views

What programming skills are needed in quantitative finance? [closed]

I’m considering a career in finance when I complete my PhD in Mathematics in 2016. My only major programming experience was a C++ course during my MPhys in the 2007-8 academic year, although since ...
3
votes
1answer
93 views

QuantLib C++: Monte Carlo Engine with SequenceStatistics

I'm trying to implement a Monte Carlo PricingEngine that stores multidimensional statistics. I have done the following: Defined a Monte Carlo Trait that among other things stores as the ...
3
votes
1answer
229 views

Do you have a good application example of Approximate Dynamic Programming?

Have you ever tackled a finance problem with Approximate Dynamic Programming? I have only used dynamic programming for simple examples like a optimal extraction in mining. Do you have canonical ...
3
votes
3answers
205 views

Convergence of GBM mean after simulation?

As a follow up of my previous question, I am now simulating the GBM step by step for $n$ steps. I am using the following implementation for the simulation: $$S_{t+1} = S_t \exp \left[ ...
3
votes
1answer
579 views

How to manage evaluation date changes in QuantLib while using ImpliedTermStructure Class

I will not attach the whole code 'cause it would be just a huge waste of space and it would be not useful for this question's purpose. What I am going to attach here is a snippet code and its output, ...
3
votes
1answer
149 views

Are there any good benchmarks for performance of vanilla option pricing code?

I've seen parsec (http://parsec.cs.princeton.edu/index.htm), which has a PDE pricing component, but the distribution is enormous and I haven't bothered to try to download it for review. I'm ...
3
votes
1answer
94 views

QuantLib: Is the StochasticProcess class adapt for a HJM type of modelling?

I would like to use the following model in QuantLib: $\frac{dF(t,T)}{F(t,T)} = \sigma_se^{-\beta(T-t)}dW_{t}^{1} + \sigma_L\left(1-e^{-\beta(T-t)}\right)dW_{t}^{2}$ This is a reformulation of the ...
3
votes
2answers
37 views

Dealing with a constraint which is the square root of a quadratic form

I'm trying to maximize my portfolio, but don't know how to deal with the constraint which is on the form max $2u^Tx-x^T \Sigma x$ Subject to $e^Tx = 1$ $u^Tx - m (x^T \Sigma x)^{1/2} >= c $ ...
3
votes
1answer
167 views

What is the best data structure/implementation for representing a time series in C#?

I'm looking for a tick by tick high performance container. So far I've been using List where Tick is a simple struct with a DateTime and double field. I'm using Linq for date lookups but it's ...
3
votes
2answers
353 views

Trend estimation techniques

What is the best way (most common) to discover if a stock is trending or not? (Despite drawing a line). A hurst exponent? A linear regression maybe?
3
votes
1answer
530 views

Which method is implemented by Excel's YEARFRAC for ACT/ACT?

I know the algorithm used by Excel to calculate the YEARFRAC(startDate, endDate, basis) for basis=1. Excel calls the method "act/act". A Java re-implentation of Excel's algorithm can be found at ...
3
votes
3answers
131 views

Real-time Tick Data API for the Italian Stock Market

Hello community. I am looking for a service that is able to provide real-time tick data (time&sales) for the contracts traded in the Italian Stock Market (Borsa Italiana). The service should ...
3
votes
0answers
94 views

What is the best open source automated trading platform or options?

I would like a custom C++ Automated Trading Platform for Futures like Multicharts, or similar automated trading platform that I can put on my servers so its secure and fast. I have found this ...
3
votes
0answers
72 views

Downloading IB futures data and then making a datapump to another program

I never have programmed before in my life but I wouldn't mind learning if I knew what i needed to do in order to solve my problem. I use neuroshell for day trading and use it extensively for trading ...