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)

1
vote
0answers
94 views

Calculate display and plot relative spread using Sierra Chart

I'm trying Sierra Chart for trading Bitcoin. I would like to display relative spread for a given volume. spread_rel = 200.0 * (ask - bid) / (bid + ask) where ...
0
votes
0answers
213 views

IB with R which package?

I want to implement my models in R and trade according to them with my IB account. Now I am wondering, how I should solve this problem? Do I need to program with C an access ...
0
votes
0answers
110 views

Log returns and time

In calculating realized/historical vol for fx spot, my samples/fixings are currently every minute. I need to be able to calculate and plot historical/realized vol on demand from spot prices. ...
2
votes
1answer
355 views

How to simulate stock prices with stochastic time change subordinated arithmetic Brownian Motion?

the idea is to simulate price returns thus to be normally distributed i 'am trying to use subordinated arithmetic brownian motion subordinated to time activity (volume) stock prices are following GBM ...
13
votes
4answers
4k 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 ...
0
votes
0answers
44 views

Java limitbook implementation? [duplicate]

I am looking to create my own front-end. What is the best data structure/java swing object to represent a limit order book? currently I am using two JTables and loading best bid and qty data from a ...
3
votes
1answer
276 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
926 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 ...
6
votes
2answers
2k views

Fastest news feed APIs targeting high frequency trading?

The Dow Jones elementized news feed API seems to stand out but are there any other machine readable news feeds out there that provide very low latencies that high frequency operations may peruse? I am ...
3
votes
4answers
1k views

IB TWS & API, without IB account?

I'll be starting a MFE grad program in Fall, and some of the classes have a lab that use the IB TWS & API. I'd like to play around with it for fun this summer. Unfortunately, I don't have an IB ...
0
votes
0answers
283 views

R or Matlab code for Multi-Barrier-Options (3 or more underlyings)

I am looking for R or Matlab code examples of multi-barrier-options (or multi-barrier reverse convertibles) with at least 3 underlyings. Do you have such code or can you point me to a place where I ...
2
votes
1answer
426 views
1
vote
0answers
573 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 ...
2
votes
0answers
184 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 ...
2
votes
2answers
824 views

How can you convert the CUSIP of a bond issue to the CUSIP of the company's stock/

As part of a research project I ran a query on the Mergent FISD database using the WRDS website. The output included the CUSIPs of numerous bond issues (>10000). I am using this data to run event ...
1
vote
2answers
205 views

For a interdays trading backtest system, should I put day open, close, high, low, volume separately into array?

I think there are two possible ways: 1. day open, close, high, low, volume separately into array, then I have 5 arrays to work with my calculation 2. Put all of these into one array or linklist to do ...
2
votes
2answers
167 views

How do you handle order tracking (without unique Lot ID's)

Hypothetical Trade: I buy 10,000 shares of ASTC using a broker API. The order is filled in 4 similar lots; ...
2
votes
1answer
239 views

QuantLib error with qlPiecewiseYieldCurveData() on qlPiecewiseYieldCurve() with ZeroYield and ForwardRate

I'm using QuantLibXL to build a discount curve, a zero yield curve and a forward curve of the EURIBOR rate (QuantLibXL is downloadable here). I've built an object of class ...
1
vote
0answers
140 views

Example code for “Gauge Invariance, Geometry and Arbitrage” paper

This paper describes an algorithm for computing arbitrage opportunites using a gauge connetion. Has anyone written a python program or C++ or C# program that shows how to follow the steps outlines in ...
13
votes
5answers
3k 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 ...
2
votes
3answers
2k 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 ...
2
votes
1answer
2k views

Duration of a floating rate note

I have the following C# code for calculating the modified duration of fixed coupon bonds: ...
3
votes
3answers
253 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, ...
-2
votes
1answer
291 views

How to look for fractals/harmonics patterns in time series?

I want to build trading systems based on two things: 1)Fractal Theory 2)Harmonics Pattern I have read the book : The Misbehavior of Markets: A Fractal View of Financial Turbulence By Mandelbrot ...
-4
votes
1answer
113 views

Is there an API to perform request about stocks and financial derivatives? [closed]

Is there an API to make a request such as: all the companies which thier P/E ratio is greater than 50 ? I know I can crawl google finance and have it locally on my ...
31
votes
12answers
29k 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 ...
1
vote
1answer
192 views

Need to match my bond price calculation to that of Bloomberg, currently failing hard

I have a fixed-coupon bond with the following characteristics: ...
1
vote
0answers
96 views

RCaller & RQuantlib error in java

I am receiving the following error: ...
2
votes
1answer
366 views

How does the CME set margin requirements on commodity Futures

I am trying to model margin requirements on various commodity futures, however it doesn't seem that the CME has released the formula they use to set these performance bonds. I am sure that they use ...
1
vote
1answer
430 views

LIBOR Rates available in CSV, XML etc

Is there a website that offers current LIBOR rates for all tenors for free in machine readable formats?
3
votes
2answers
1k 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 ...
11
votes
3answers
3k 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 ...
1
vote
0answers
514 views

portfolio optimization with a loop

I am attempting to minimize the variance of a 3 stock portfolio using optimization within a loop. What I have done is calculated the stock returns and cov matrix from dates 1980-01-01 to 1989-12-31 ...
15
votes
7answers
12k views

Is the Interactive Brokers API suitable for hft?

By hft here I mean anything with holding period less than 5-10mins... Any empirical/anecdotal evidence of using it successfully on even higher frequencies?
20
votes
11answers
5k 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 ...
0
votes
3answers
491 views

Why C is still in use especially in area of numerical optimization (instead of C++)? [closed]

Why C is still in use especially in area of numerical optimization (instead of C++) ? C and C++ aren't fully compatible so mayby you know some differances that make the difference ?
5
votes
3answers
2k views

What API methods are there to determine a company's market cap?

I'm wondering what API methods there are to determine a company's market cap, i.e. (number of shares issued) * (price per share). I know IQfeed and perhaps Yahoo will do this - does anyone know of ...
6
votes
4answers
2k 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 ...
5
votes
1answer
780 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 ...
2
votes
2answers
985 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 ...
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 ...
6
votes
4answers
1k views

Fastest solver possible for portfolio optimization

I am using quadprog in MATLAB for very simple mean-variance optimization, with less than 100 assets. It is quite fast but if I run a strategy with daily ...
1
vote
1answer
66 views

How to attribute income that incurs a double liability in a P&L?

I'm a developer writing a system for a startup. Without giving away too much of the business model, here are the basics of how it works: The web site has two forms of "currency": tickets and ...
2
votes
3answers
1k views

Is MATLAB-generated code good enough for use in live trading?

I know that MATLAB has mechanisms for generating code, but I've never used them. Have you? If you have - is it good enough (=fast enough, I guess) to be used in live trading systems? Anything one ...
2
votes
3answers
709 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.
5
votes
5answers
2k views

Technology stack used in Bloomberg

I figure this perhaps the best place to ask this. What technology stack is used in Bloomberg? I'm C++ developer, and I definitely prefer C++ to C, so I don't want to touch C unless it's strictly ...
10
votes
2answers
688 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 ...
-1
votes
1answer
546 views

Is it possible to “steal” financial data on publicly traded companies off the internet? Legally, I mean, what is the truth about “data” as a property

What constitutes "stealing" when it comes to publicly posted financial data? I think there are three instances of this that we can individually vet: a.) you physically broke into a location or ...
5
votes
2answers
472 views

Using QuickFIX in a C project

QuickFIX is a well-known open-source implementation of the FIX protocol. This library has been ported to numerous languages, though for the moment I am concentrating the on C/C++ implementation. ...
4
votes
3answers
323 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 ...