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)

0
votes
0answers
26 views

Historical volatility on bloomberg API

Is there a way to obtain the historical volatility of a stock from the bloomberg API? I would be looking for the data in the HVT table. Actually 3-months historical volatility from now would be ...
0
votes
0answers
9 views

How to get currency denomination of security from yahoo finance API

I'm trying to write a portfolio program and it would be nice if it could auto detect what the currency denomination of the ticker is without needing user input.
3
votes
0answers
50 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 ...
0
votes
0answers
36 views

How is a second-sensitive MACD calculated?

I am trying to get the specifics on the calculations of a MACD line that is calculated every second, as can be seen by using Bloomberg or Interactive Brokers or something of the like. I am assuming ...
2
votes
1answer
93 views

How to download efficiently intraday data with Bloomberg API?

I'm downloading intraday bar data using Bloomberg API and C#. I have adapted the official Bloomberg c# "IntradayBarExample” to suit my needs. However downloads are really slow, I found this post ...
1
vote
0answers
46 views

Looking for most current Financial API that is fast and accurate for NYSE NASDAQ AMEX OTC and PINKs

Looking to build a real time data feed, stock monitor window. Pretty much the same as equityfeed.com market viewer window, just with a few addedfeatures and or different filter columns with more up ...
1
vote
2answers
51 views

Normal Inverse Gaussian distribution - any consensus on an accurate quantile function?

I am making use of the Normal Inverse Gaussian distribution in my work to model underlying interest rate implied volatility risk drivers. What is particularly nice about this distribution for my ...
1
vote
1answer
187 views

How to answer this interview programming question about drawdowns?

I saw this question as an interview, and to be honest, I have no idea what it's even asking for: Write a function (in R or Python) that finds the stock drawdown which will trigger a rebalance, ...
0
votes
0answers
7 views

Is there a free Source for currency forward rates into Excel? [duplicate]

Is there a free (or at least very cheap) service/api out there I might be able use to get yesterday's closing currency forward rates (and spot) into excel/csv without having to copy paste values from ...
0
votes
0answers
29 views

BLS v2 API took 20+ minutes to publish data where is immediate data available?

First, I should state that I built a Java program that uses HTTP Components to keep in sync with server time for my broker. Once 7:29:59 comes around the program ...
1
vote
1answer
74 views

QuantLib: New Instrument derived from VanillaOption + PricingEngine that must work for both VanillaOption and the derived class

The derived class is a Vanilla Option on a Future and I need to specify the expiry of the underlying future which is in general different (later) than the expiry of the Vanilla Option. I have ...
0
votes
0answers
56 views

Real Time/Historical weather data

I am looking to incorporate weather data into my algorithmic models. What is a good source to find historical + real time weather data by zipcode or region? Any help will be appreciated! Preferably an ...
-1
votes
1answer
37 views

Finding Discount Bond Matrix in LMM Model C++

I am working on a 1 Factor Libor Market Model (LMM) in C++ and I working my implementation of the formula to find my Discount Bond matrix via the following formula: In the case of my model alpha is ...
1
vote
1answer
72 views

How to price touch options using quantlib?

I am new to quantlib and I want use it to to price a touch option (single/double). I searched on google for example code but I could not find anything. Hence, I am ...
1
vote
0answers
102 views

How to add buy/sell market on a long/short Bollinger Bands graph in python?

I am using python, pandas, matplotlib to do the following: I have plotted some stock data ...
2
votes
2answers
75 views

How to perform portfolio optimization with user-defined expected return and variances using R?

I found some functions for Markowitz mean variance portfolio optimization in R such as portfolio.optim in tseries package. ...
2
votes
2answers
77 views

Is there an implementation of VAR-EGARCH model in R or Stata?

I am writing my undergrad honor thesis and want to run a multivariable VAR-EGARCH model. Is there any package in R or formulas in Stata 14 that allows me to implement directly? If not, could you ...
3
votes
2answers
88 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 ...
4
votes
2answers
104 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, ...
3
votes
1answer
75 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 ...
1
vote
0answers
43 views

How to handle missing data in time series in R?

I have 5 years stock closing price of a company with some missing values in between (I having 1443 data points). When I create timeseries object in R with frequency 365 it creates 1834 data points, R ...
1
vote
1answer
44 views

What is wrong in my non-linear estimation sample code?

I am trying to reproduce the code and plot you see here on pages 8,9 and 10 which was coded in MATLAB, but I'd like to convert it to R code. I believe I converted the MATLAB code below to R syntax ...
1
vote
0answers
58 views

What are the best online platforms to hire a quant? [closed]

I have already written the base of a trading algorithm, however there are some optimisations that I would like to add that might be best programmed by more experienced quantitative programmers. This ...
3
votes
1answer
79 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 ...
-1
votes
1answer
111 views

Is the code of my binary call option pricer (using explicit finite difference, backward scheme) correct? [closed]

I am using explicit finite difference (backward scheme) to price a binary call option. Here is my MATLAB code: ...
4
votes
2answers
240 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 ...
2
votes
0answers
33 views

Rollapply: what does by.column do? [closed]

I have read the description of by.column for rollapply in the manual but i couldn't understand how to use it. see below: x=matrix(1:60,nrow=10) ...
1
vote
0answers
89 views

How to extract sentiment from Yahoo finance message board?

Does anyone know if it is possible to write a software to pull Yahoo message board sentiment for a specific stock? Any API from Yahoo or anyone has done it before?
1
vote
0answers
30 views

Jacobian for Newton method for American options by front fixing

In this paper Penalty and front-fixing methods for the numerical solution of American option problems a front fixing method based on Newton is described for an American put option is described. I am ...
2
votes
1answer
79 views

Why is my Euler discretization error increasing with number of steps?

I'm trying to see how the Euler discretization error behaves with respect to the number of steps. To do this I'm simulating a geometric brownian motion and comparing it with it's 'exact' solution. ...
1
vote
0answers
57 views

QuantLib C++: Friendship dilemma between derived class from PiecewiseYieldCurve and Bootstrap class

I derived a class template, OISCurve<Traits,Interpolator,Bootstrap>, from ...
0
votes
0answers
20 views

free and reliable stock ticker API [duplicate]

I am looking for an API that will give me (somewhat real time) stock quotes for free for a website. I have heard about using yahoo finance URL download but (to the best of my knowledge) yahoo could ...
2
votes
1answer
119 views

Get institutional holdings of stocks programmatically

First of, I'm not sure if this is the right place for this question, but a search on Google for another programmatically related question regarding stocks led me here, so here it goes. Is there any ...
3
votes
0answers
69 views

Approximate asian geometric option with Heston

I am trying to implement Theorem 1 from this Journal in RStudio. The journal says the it is possible to find a approximate price of a geometric asian option in a Heston setup this way: ...
9
votes
4answers
533 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 ...
4
votes
1answer
121 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 ...
1
vote
3answers
146 views

Realtime Exchange Rate Data API

There are various sources for real-time exchange rate data, e.g. Ariva EUR/USD. Is there also an API or other source which enables to automatically retrieve real-time exchange rates as a data stream ...
5
votes
2answers
421 views

Change periodicity on Rblpapi

So Dirk Eddelbuettel, Whit Armstrong, and John Laing released Rblpapi to CRAN recently, and it is awesome. I'm having some difficulty understanding how the overrides work though, hopefully someone can ...
2
votes
0answers
111 views

More cache friendly linked list or alternative with optimal append, delete, and ordered traversal for limit order book?

I am trying to implement a stock matching engine/order book in C++, and am searching for a more cache friendly architecture. Currently, my data structures are as follows: An intrusive rb-tree for the ...
1
vote
0answers
39 views

Is there a limit to the number of Spot rates than can be calculated from Par Yields

I am just trying to calculate Spot Rates from Par yields. I find that the code below gives very similar spot rates for the data here, yet if I increase the size of the ...
1
vote
1answer
79 views

Calculating Accrued Interest of Bonds

I am trying to calculate the accrued interest for a set of Treasury Bonds. I am comparing the answer from the code below with that for the 1st Bond(row) over here. In the link the AI is ...
1
vote
1answer
33 views

Correct Theoretical Discount Factors from Nelson-Siegel-Svensson?

I am calculating the theoretical discount factors associated with a bond that has 30 months to maturity from today with the parameters below obtained from here using the Nelson-Siegel-Svensson Model. ...
3
votes
1answer
147 views

Issue with OLS Regression for Nelson Siegel Svensson parameters

I have been working on getting input parameters to the Non-Linear Optimization which gives the Nelson Siegel Svensson model parameters and am carrying out the OLS regression as described in this ...
4
votes
0answers
100 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 ...
1
vote
1answer
113 views

Broker or source of intraday futures data for a python API?

I am looking for a broker that offers a python API for downloading historical intraday data on futures. So far I have only seen Interactive Brokers and Tradestation. Are there some other brokers ...
3
votes
1answer
134 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 ...
1
vote
0answers
11 views

Is there any theoretical work to find an optimum size for the size of horizon in finite-horizon optimization or control?

we learn a lot about finite and infinite horizon control in dynamic programming. but I was wondering if we want to minimize the cost per time(discrete time) is there any work to find the optimum size ...
1
vote
1answer
270 views

ASX level 2 data via API

Is anybody aware of Java/C++/Python API's available for ASX stock market depth? I'm currently using IB which is ok but has a number of limitations / issues - the one I care most about is the limit of ...
2
votes
1answer
105 views

Test .mql4 (meta trader 4 editor) when the fx market offline

I am coding some simple .mql4 program, you know, the fx market is offline on weekend, and the market will be not shown in Meta trader 4 platform. I wanna test my program in meta trader 4 on weekend. ...
3
votes
0answers
232 views

Bloomberg scripting language (BLAN)

Did anyone work with Bloomberg scripting language (BLAN is the name I guess). If so is it really flexible and is it competitive with other valuation services (say Super Derivatives). Does it enable ...