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
1
vote
1answer
65 views

Calculating returns with trading costs

This perhaps is an over simplification of calculating trading returns while including trading costs. I've made some assumptions - the commission for investing and extracting an investment is 1% and 2% ...
1
vote
2answers
65 views

What market conditions are attributable to prolonged instances of triangular arbitrage opportunities?

I am investigating the potential for intra-exchange triangular arbitrage opportunities for the Cryptocurrency market. I believe that due its immaturity, relatively low volume and high volatility that ...
1
vote
2answers
63 views

Converting time bars to tick bars or volume bars in python

Recently I've started reading Advances in Financial Machine Learning by Marcos Lopez de Prado. In the second chapter the author defines some essential financial data structures, like tick bars, volume ...
1
vote
2answers
144 views

Would C++'s speed over Python make it a more applicable language for scalping arbitrage opportunities?

I am using the Bittrex exchange API to ping markets to poll whether there are triangular arbitrage opportunities available for USD/BTC/LTC/USD. Note that I am not trading but rather synthesising them ...
3
votes
5answers
15k views

Symbols for DAX from Alpha Vantage

I found the website https://www.alphavantage.co as an alternative for yahoo finance stock API. I am interested in the top 30 DAX symbols, but I seem to cannot find them on Alpha Vantage. Is there a ...
3
votes
1answer
392 views

What are some popular free/open-source charting controls?

Recently I've tried SciChart and VisiBlox - beautiful charting tools. Are there any free or open-source tools for visualizing charts in C#? Thank you for answers.
3
votes
1answer
1k views

Please advice free Java library for classical time series forecasting

I've got an ARIMA model (with a GARCH model for variance estimation) and parameters estimated in Matlab for my set of data. Now I need to use this model in my Java based application for making ...
0
votes
2answers
56 views

Wha't the best place to grab historical sophisticated data about stocks?

I am looking for an API which allow me to grab a data about companies & their stocks in the historical perspective. Like not only prices, but let's say balance sheets & cashflow statements ...
0
votes
0answers
20 views

R Portfolioanalytics - How to calcuate the objective measures for a given portfolio weights

I am trying to calculate the objective measure i.e return and std dev for a given set of portfolio weights using PortfolioAnalytics package. i am able to set the weights of the assets in the portfolio ...
12
votes
4answers
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 ...
5
votes
5answers
4k 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 provider ...
12
votes
4answers
12k views

How to create charts in WPF finance applications?

How to create charts for market data in WPF? Are there any charting controls provided by microsoft or you need to use only third party controls? Which are the popular third party charting controls ...
0
votes
2answers
61 views

How to calculate 5 EMA

I am trying to understand the basics of finance indicators. I have made 15 minute ohlc candles for the past 50 days. Now if I try to calculate 5EMA, my doubt is ...
1
vote
1answer
154 views

Question regarding fitting Euribor curve using different basis quotes using Quantlib Python

I am trying to fit a EUR curve based on the following instruments:- EONIA quotes 1m vs 6m basis quotes 3m (outright) quotes 6m (outright) quotes 6m vs 12m quotes (1) , (3) & (4) are simply ...
1
vote
0answers
38 views

Looking for references on reinforcement learning in finance

I plan on using reinforcement learning for a research project. To be specific, I plan to define learning environments using market microstructure models whose solutions are well known and see if I can ...
4
votes
4answers
249 views

R: Book with extensive examples for either portfolio optimization or volatility forecasting?

I'm at a new job and there's the option to use R (you don't have to, but I'd like to). I used R years ago, so I while I'm somewhat familiar with it, I have forgotten most of it. For me, the best ...
0
votes
2answers
32 views

Value a Swap with Custom Coupons with QuantLib

I'd like to valuate a custom Libor3M - Fix swap with QuantLib in Python. With custom I mean, custom starting/end/payment dates for every coupon, a fixed coupon in the float leg (starting_date < ...
0
votes
0answers
21 views

Quantlib-SWIG Python: impliedHazardRate requires “warm” discountcurve

I am getting different results from the CreditDefaultSwap().impliedHazardRate() method, depending on whether the discount curve passed is "cold" i.e. just created ...
0
votes
1answer
500 views

Free dividend data API for non-US stocks

Is there are any free API for dividend data that does also include non-US stocks? I know of this question from three years ago. However, the situation has changed since then apparently, as there are ...
0
votes
0answers
16 views

Swaptions vols,object using quantlib xl

How can I build a good vol surface using QuantlibXl? My goal is to price a swaption 5 year with option maturity 1Y1M. The data are:
0
votes
1answer
79 views

Heston volatility surface in Python QuantLib

Does anyone have experience with the Python QuantLib function HestonBlackVolSurface? I'm trying to produce a 3D plot of the volatility surface as done in the ...
0
votes
1answer
64 views

Pricing coupon bond on weekly basis effectively

I have a coupon bond with $NV=20 000 000$ and coupon $4\% p.a.$, assumed the coupon is paid annually (I don't have this stated explicitly). Let's assume, the starting date is 27.4.2015, so the first ...
0
votes
1answer
14 views

Which object in DateGeneration object when there are two short, long or combination in Schedule object for py QuantLib?

I'm pricing a vanilla swap. I have two stubs, front and back, and they can be short, long or a combination. In this case, what do I use in ql.Schedule object for <...
0
votes
1answer
15 views

Valuating Custom Amortization Schedule Libor IRS with QuantLib

I got to bootstrap the OIS and Libor 3M swap curves, and now I'd like to valuate some simple Libor3M - Fix IRS with QuantLib (in python). My problem is that some of the instruments I have to valuate ...
4
votes
2answers
4k views

Alpha vantage API Not working for NSE while the same query is giving output for NYSE stocks

Was trying to pull intraday data with free api from alpha vantage but unable to download it; While At the same time I'm able to download daily OHLC data. Also, intraday data query is working for NYSE ...
0
votes
0answers
14 views

Financial models under the defprobstrip() command in Matlab 2020a

what is the financial theoretical model below - defprobstrip() - hazardrates() - survprobs() contained in https://www.mathworks.com/help/fininst/examples/...
1
vote
2answers
278 views

Java platform/lib widely use in industry

I am currently switching from Java dev to quant and for my self-study I want to code a few auto-trading algorithms to get my hands on the subject. Are there any must know platforms/libs that I should ...
0
votes
0answers
21 views

Q-learning, state transition, immediate rewards (grid world vs. trading bot)

I've been thinking about how to correctly calculate rewards in a trading environment for several weeks now. Here is a grid example: ...
0
votes
1answer
31 views

TS Database performance issue

I've just found out about this forum while searching for answers for an InfluxDB performance "issue". I'm using it to store financial tick data (7 fields per row), query it and process it into candles....
2
votes
1answer
48 views

Is there anything like Quantopian in R?

Quantopian is an incredible tool for the quant community, but it is Python based only. Just wondering if is there anything like Quantopian in R that you reccommend?
4
votes
3answers
154 views

Advice on learning C++ and its integration with Python/R/MATLAB for quantitative finance

For some background information, I am a PhD student in economics. Although I did not study in finance previously, I took a course on stochastic calculus and a course on asset pricing in incomplete ...
2
votes
3answers
136 views

Why is C/C++ used by researchers to develop and test algorithmic trading strategies?

I understand why compiled languages such as C/C++ are important for low-latency trading infrastructure. But I am curious why even researchers at the high-frequency trading firms also require a strong ...
0
votes
1answer
16 views

How to make the effective date to start on a holiday/weekend in py QuantLib?

I'm trying to price a non-standard swap. However, my schedule is not returning the correct dates. In particular, the effective date starts on a Saturday but the schedule returns the next biz date ...
3
votes
3answers
5k views

Pricing a fixed rate bond in Quantlib Python

I'm trying to implement a pricing model for fixed rate bonds with the code below. ...
3
votes
1answer
349 views

Crossing the spread as a ML signal

In the optic of high-frequency trading, most of the standard trading algorithms work on the principle of mid-price prediction or mid-price movement prediction. However a big drawback of this technique ...
3
votes
2answers
199 views

How to interpret and define statistics of GBM output

I am trying to model the future prices of a number of commodities. For this, I am applying geometric Brownian motion, writing a Monte Carlo code in Python. Given that I want to estimate tommorows ...
1
vote
1answer
41 views

How can I extract the strike price from a Quantlib option object?

I am trying to write a Python function that performs some calculations using a list of Quantlib options, and I would like to pass only that list without other information. In particular, the strike of ...
0
votes
1answer
63 views

R - Portfolio construction based on own calculations, with rebalancing of components

I have used random forest in R to get probabilities for stocks being in a certain class. With those probabilities i would like to construct portfolios containing the 5 stocks with the highest ...
3
votes
1answer
377 views

Best way to buy and sell large volumes of crypto

I had a few questions about how to properly execute a large order of crypto currency without moving the price much. I know a lot of funds employ a TWAP/VWAP algorithm to liquidate or purchase a large ...
0
votes
1answer
86 views

Confidence Intervals for ARMA+GARCH forecasts

I have fitted an ARMA(1,1)+GARCH(1,1) model to my logreturns series. When it comes to my standarized error's distribution however, I have opted for a Skewed Generalized Error Distribution, because of ...
2
votes
1answer
104 views

GARCH(1,1)-M MLE optimization with fmincon in R

I've searched thru dozens of papers and did not find in any of them satisfying and enough theoretical answers to my concerns. So I've combined everything what I found below. Please indicate if my ...
4
votes
4answers
22k views

How can I calculate the Maximum Drawdown MDD in python

I need to calculate the a time dynamic Maximum Drawdown in Python. The problem is that e.g.: ( df.CLOSE_SPX.max() - df.CLOSE_SPX.min() ) / df.CLOSE_SPX.max() can'...
5
votes
2answers
130 views

How to get a Daily Market Cap using Python

I'm looking for a way of getting free historical daily market caps ? I can get todays Market cap from yahoo but need old market caps also.. thanks for the help. ps: I don't have Bloomberg and school ...
0
votes
0answers
42 views

Double jumps stochastic volatility model (SVCJ, Duffie et al, 2000) - characteristic function for VIX

Currently I am working at my master's degree paper where I want to evaluate VIX options using stochastic volatility jump models.I got some MATLAB codes for the SVCJ model for the S&P, but as the ...
0
votes
0answers
36 views

API for Real-time and historical Stocks Tick Data

I am looking for a reliable API (e.g. Bloomberg, but available for individuals) where I can get stock tick data up to the minute, both historical and real-time. Obviously I am willing to pay for the ...
2
votes
3answers
609 views

Stock Exchange Software

For weekends project, I would like to setup a "simulated" stock exchange on my dev server (windows/linux), ie. running my own NYSE server ? what options do I have, open source wise (can be c# or java ...
0
votes
1answer
79 views

Monotonic Cubic Spline interpolation QuantLib python

I am new to QuantLib-Python and I am trying to replicate the implementation of a Dual Curve bootstrap using QuantLib-Python. I have followed the steps in Chapter 9 of the QuantLib Python Cookbook. ...

1
2 3 4 5
26