Questions tagged [quantitative-finance]

Quantitative finance is the discipline of using mathematical models in order to help make investment decisions. On-topic questions will only approach this topic from a programming point of view, and include a language tag such as r, matlab, python, etc. Theoretical or purely mathematical questions are not on-topic at Stack Overflow.

Quantitative Finance is a set of methods of approaching finance in a principally technical, quantitatively supported manner.

This represents a wide-reaching suite of mathematical approaches to many subject of interest in a domain of finance, that not always had such comfort of purely quantitative methods of work.

Application domains of the state-of-art quantitative finance methods start from time series data analysis, cover technical analysis ( TA ), modeling both market risk & approaches to risk management techniques, create support for a detailed financial products' engineering, introduce advanced applied statistics into predictive analyses, into risk adjusted portfolio management decisions and as such also include all recent promoted flavours of quantitative tools like machine learning, in it's narrow sense of supervised learning methods, various stochastic methods for options pricing models, Hidden Markov models ( beneficial by introducing an innovative view on a set of indirect, hidden, factors involved in a model of an externally observable process ), Artificial Intelligence tools ( somewhat over-hyped ) in it's very narrow sense, with a common use of artificial neural networks ( ANNs ), recurrent NNs, more recently deep-learning NN, with a few attempts to inject even LSTM NNs and some more sophisticated types of automated ( unknown ) model creation strategies.

If your question concerns theoretical topics on quantitative finance or practical topics which are not about implementation you might want to ask the question on quant.stackexchange. In particular, this tag should never be used a alone but always in combination with a specific programming language (like for example , , , ).

771 questions
6
votes
2 answers

Highstock vs Google Charts in Performance

A) I'm using the Highstock charting library for a finance project of mine. However, I'm getting bogged down in performance issues. My working implementation of Highstock has i) 5 graphs in a chart ii) multiple lines (and line-types) in a graph iii)…
5
votes
2 answers

R Ibrokers twsOPT usage

reqMktData(tws,twsOPT("AAPL 110820C00390000")) or reqMktData(tws,twsOPT("AAPL110820C00390000")) result in: TWS Message: 2 1 200 No security definition has been found for the request Why? reqMktData(tws,twsSTK("AAPL")) works fine. The manpage…
Pauly
  • 101
  • 7
5
votes
4 answers

installing the ibapi package

Hi I am trying to install ibapi in python however the package seems to be unavailable because there is an error every time I try to install it is there another way I can install this package . Your help will be greatly appreciated. I have left the…
5
votes
3 answers

How to apply the Hurst Exponent in Python in a rolling window

I am trying to apply the Hurst Exponent on SPY closing prices on a rolling window. The below code (which I got from here: https://www.quantstart.com/articles/Basics-of-Statistical-Mean-Reversion-Testing) works well if I apply it on the closing…
Martingale
  • 511
  • 1
  • 6
  • 15
5
votes
0 answers

Google Finance API address has changed

Until yesterday the following URL (Google Finance API) https://www.google.com/finance/getprices?q=TSLA&x=NASDAQ&i=3600&p=5d&f=d,o,h,l,c,v would lead to a nice comma delimited data table with TSLA stock data. Since yesterday, the same call gets…
user3612816
  • 325
  • 2
  • 11
5
votes
1 answer

How to use a custom calendar in a custom zipline bundle?

I have the following code in my viacsv.py file that aims to allow a custom bundle to be ingested: # # Ingest stock csv files to create a zipline data bundle import os import numpy as np import pandas as pd import datetime boDebug=True # Set True…
sometimesiwritecode
  • 2,993
  • 7
  • 31
  • 69
5
votes
3 answers

ValueError: ordinal must be >= 1

This Code, Takes 2 co-ordinates for a straight line from google finance and places 3rd point on the same line at some distance. import datetime as dt from datetime import timedelta as td import matplotlib.pyplot as plt from matplotlib import…
BlueQuant
  • 335
  • 3
  • 5
  • 13
5
votes
1 answer

Variable Moving Average

I have a DataFrame that looks like: a b 1 0.9 0.796522123 2 0.8 0.701075019 3 0.6 0.777130253 4 0.5 0.209912906 5 0.75 0.920537662 6 1 0.955212665 7 3.5 0.227221963 8 2 …
dsugasa
  • 663
  • 1
  • 9
  • 26
5
votes
1 answer

Adding Multiple Chart Series in Quantmod R

I am trying to plot two charts on one chartSeries in quantmod in R. I am having some difficulty doing this. library(quantmod) tickers <- c('GLD', 'GDX') data <- new.env() getSymbols(tickers, src = 'yahoo', from = '1980-01-01', env =…
Defcon
  • 807
  • 3
  • 15
  • 36
5
votes
1 answer

Value-at-Risk (Extreme-Value Theory) using Monte Carlo Simulation in R

I have code that successfully calculates VaR based on Extreme Value Theory using historical data. I'm trying to run this same code on multiple simulated price paths (i.e. calculating a VaR for each path) and then taking the median or average of…
4
votes
3 answers

Date Format for Mathematica

As I am trying to plot a few financial time series in Mathematica, I just ran into a problem illustrated in the figure below : It seems the data are no longer dealt with after Year 2000 Is there a way to fix that ? What would be the best format to…
500
  • 6,509
  • 8
  • 46
  • 80
4
votes
3 answers

How to calculate periods since 200-period high of a stock

I would like to calculate the number of periods that have elapsed since the 200 period high of a univariate time series. For example, here's the closing price of SPY: require(quantmod) getSymbols("SPY",from='01-01-1900') Data <- Cl(SPY) Now, I can…
Zach
  • 29,791
  • 35
  • 142
  • 201
4
votes
1 answer

Yfinance - alternatives?

I've started developing some stuff using yfinance but coming across a few issues. For one I can't get the financials, cashflow, earnings etc to work. The ticker.info function does have some of that data (say earnings) but far from everything. Tried…
ZedIsDead
  • 105
  • 9
4
votes
1 answer

Algorithmically detecting jumps in a time-series

I have about 50 datasets that include all trades within a timeframe of 30 days for about 10 pairs on 5 exchanges. All pairs are of the same asset class, meaning they are strongly correlated and expect to have similar properties, but are on different…
zonfl
  • 328
  • 2
  • 8
4
votes
2 answers

Denoise of Financial Time Series Data using Wavelet Transform

I need to denoise financial time-series data for a machine learning problem and don't understand how a wavelet transform is computed. My understanding is that you need multiple points of a time signal to identify frequencies. What does a wavelet…
Jan
  • 131
  • 1
  • 11
1 2
3
51 52