Skip to main content

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
0 votes
0 answers
5 views

Continuation of GARCH(1,1) without data

Please be easy on me since quant finance is not my strength. I have the following Python code that models volatility under GARCH(1,1) for the S&P500: ...
dNyrM's user avatar
  • 101
0 votes
0 answers
9 views

Murex API with python [closed]

please someone know more about API for Murex? someone has an idea of how complex is to build one? I just searched online, but without to find some view about it. thanks
user74286's user avatar
0 votes
0 answers
37 views

Seeking Best Methods to Identify and Analyze Sharp Trends in Stocks and Currencies Using Python

I have basic proficiency in Python development and I'm interested in analyzing the relationship between certain parameters and sharp changes in stock and currency trends. What are the best methods for ...
Alex's user avatar
  • 1
0 votes
1 answer
60 views

Allocation of time to maturity day difference into standard tenor buckets in python

I was wondering if there is a quick way, e.g. via quantlib or any other python package/module, to allocate or to correspond time to maturity day differences to standard tenor buckets. In other words, ...
Whitebeard13's user avatar
0 votes
0 answers
92 views

HFT using Pure C [closed]

Coding for HFT (statistical arbitrage engine) without getting involved in C++. Pure C, 8086 Assembly, Python, CUDA. Does it make sense? What is feasible? Will I be restricted when using FPGA or ...
Utku Gök's user avatar
0 votes
0 answers
38 views

Algorithm to open a delta neutral position

I'm not sure how to articulate this problem exactly but what I am looking for as an answer is what approaches could be used to open a delta neutral position for the similar assets across exchanges ...
user74024's user avatar
2 votes
0 answers
37 views

How do i change face value of a Zero Coupon Bond in Python rateslib?

I'm currently trying to calculate the effective annual YTM of a Zero Coupon Bond with the following data: Issue date: 2024/07/01 Maturity date: 2024/09/30 Settlement date (also date of valuation): ...
Martin Lin's user avatar
1 vote
0 answers
46 views

How can calculate the American put option's vega,rho? [closed]

The QuantLib's version in my os: import QuantLib as ql ql.__version__ '1.34' All the arguments related to the put option: ...
showkey's user avatar
  • 105
14 votes
4 answers
3k views

What makes Python better suited to quant finance than Matlab / Octave, Julia, R and others?

Some background, I am not a developer at all and until now all my scripts are in Octave (open source version of Matlab). However it seems that Python is the way to go. As I am not a developer, and I ...
Frido's user avatar
  • 2,153
2 votes
0 answers
59 views

Calculating value of vanilla swap after effective date

I'm trying to find the value of a fixed to float interest rate swap using Rateslib library but I'm running into a few issues. I've followed the code exactly as the link here but now I'm trying to ...
rubiks99's user avatar
1 vote
0 answers
27 views

Issues running Fama French regression for annual portfolios

As part of my master thesis I am planning to do some analysis based on the 3-Factor Fama french model. I am not a quantitative finance person at all, so my question might be extremely basic and I ...
T_K's user avatar
  • 11
0 votes
0 answers
31 views

Are there any programs that show the highest limits order on the market?

Super noob here, and I'm sure this is already a thing but I can't find it... Often times on various stocks there are huge limit orders that have a have a high likelihood of bouncing the price. I was ...
Shedbot's user avatar
0 votes
0 answers
28 views

How to derive renko volume from candle OHLCV data

i have been recently trying to generate Renko bricks from my OHLCV data, I'm currently using stocktrends module and have successfully generated the bricks, but I'm having trouble with generating the ...
chethanRaj's user avatar
1 vote
0 answers
51 views

How to retrieve Yahoo Finance tickers for stocks, given the companies' name [closed]

I'm a student attempting to download time-series data for 27,000 stocks. I initially tried using Factset's API but lack access (as a student, I am able to manually download data, without access to ...
Irina's user avatar
  • 21
4 votes
1 answer
249 views

Calculating swap rolldown using the RatesLib Python Library

The code I am using is below, pulling in swap curves from BBG and then using RatesLib to price the swaps. ...
barnslinger's user avatar
0 votes
4 answers
145 views

Python QuantLib datecount ActualActual basis vs Matlab daycount basis

I am translating a code from MATLAB to Python and I need to find equivalent setting to MATLAB’s day-count basis of 0 = actual / actual. My MATLAB code uses date2time function to determine the length ...
Martin Kabelka's user avatar
0 votes
0 answers
45 views

Conducting PCA on features of dataset

To preface, I am very new to quantitative finance and nowhere near the point of actually trading so forgive me if this question is trivial to most of you. I am making a basic k-means clustering ...
Dylan McClish's user avatar
0 votes
0 answers
34 views

Trying to create a donchian breakout system (55day lookback)

...
ismet's user avatar
  • 1
1 vote
0 answers
68 views

Is my spread calculation correct?

I have automated Pair trading strategies running on both CME Futures and cryptocurrency perpetual pairs. I can chose between different spread calculation type and I noticed that the one I thought was ...
Sixk's user avatar
  • 11
0 votes
0 answers
18 views

How To Get Morningstar Unique Stock IDs

I have been trying to extract every piece of information I can from Morningstar's Investor platform and save it offline for free to integrate for a different use case; I have figured out how to ...
Rudy's user avatar
  • 1
-1 votes
1 answer
67 views

How to compute moving average convergence divergence without using pandas ewm function?

I'm trying to compute the moving average divergence convergence (MACD) which is a technical indicator in trading. To compute MACD we have to find out exponential moving average over a certain period ...
dev0419's user avatar
3 votes
0 answers
123 views

Rateslib - Pricing 1y EUR vs 6M (EUSA01)

I am using the rateslib python library to try to price some European swaps. It seems to be working for most tenors aside from the 1y for some reason. The code I am using is below: ...
barnslinger's user avatar
1 vote
2 answers
86 views

Reverse Optimization: finding the returns that satisfy specific weights given one known return

Here is the premise: I have a three asset portfolio, I know the assets covariance, the client's risk aversion and the expected return of one of the assets. I also have a desired set of weights. So, 1) ...
Farrep7's user avatar
  • 21
0 votes
0 answers
32 views

How to Bootstrap a daily compounding future in QuantLib

Hi I am currently tying to bootstrap the F-TIIE curve for mexican swaps In the short term it uses the F-TIIE Futures. These F-TIIE futures are 1 month futures that start on the first day of the month ...
Fiesteban's user avatar
0 votes
0 answers
58 views

ql.OvernightIndexFutureRateHelper asking for a fixing, but not able to add it

I´m trying to make a Overnight Index FutureRateHelper but when bootstrapping, the following Error arises: RuntimeError: 1st iteration: failed at 1st alive instrument, pillar May 31st, 2024, maturity ...
Fiesteban's user avatar
0 votes
0 answers
150 views

Volatility Surface Modelling in Python

For my master thesis, I try to create a Volatility Surface for S&P500 Index options. Every time I run my code, the surface I get is full of spikes. I'm just not sure if these are outliers which ...
Aaron 's user avatar
0 votes
0 answers
33 views

Is there any way to implement GARCH-MIDAS model in R for multivariate estimation?

I'm writing a research paper in economics, and would like to research the impact of both financial and macroeconomic variables on the NIFTY50 index. My plan was to use a GARCH model. I've stumbled ...
Zeeshan Mohammad's user avatar
-1 votes
2 answers
165 views

Get bonds data in python [duplicate]

Anyone knows a way of getting trustworthy bonds data in python? I know that for stock there is yfinance package but it doesnt include bonds. Thx
Lucca F's user avatar
5 votes
1 answer
283 views

Recommended Setup for QuantLib-Python AmortizingFloatingRateBond

I am trying to model a term loan in QuantLib-Python that makes quarterly interest payments at CME Term SOFR 3M + 10bps + 525bps paid in arrears with a 2 business ...
cpage's user avatar
  • 64
0 votes
0 answers
23 views

eGARCH(1,1) model evaluation (R). How to assess model integrity?

I am using GARCH modelling for my bachelor thesis in Economics. I am entirely new to the concept, and have only been looking into these kind of models for about a week now. I am trying to do a ...
Sam's user avatar
  • 1
-2 votes
1 answer
86 views

Get upfront bps from a CDS with QuantLib

I have an example the pricing of a CDS in Excel and I am trying to match it with QuantLib, in order to get the upfront bps. Below there is a print of the excel screen where I know all the values are ...
Gustavo Amarante's user avatar
2 votes
0 answers
100 views

Brent algorithm supporting automatic differentiation

I painfully implemented automatic differentiation (AD) and a Gauss-Kronrod numerical integration routine working with it with AD. (Fully tested etc, perfectly working.) Needing a root finding ...
11house's user avatar
  • 113
0 votes
1 answer
61 views

Maximze Sharpe ratio from matlab to python [closed]

I know there matlab library funtion for Optimzing Sharpe ratio estimateMaxSharpeRatio, it mentioned it use direct method How can i do the same thing in python Is there any python libraries Or need ...
andy's user avatar
  • 1
0 votes
0 answers
60 views

Visualizing Drawdown

I want to replicate the image below: Does anyone have an idea how to do this in Python. To be specific; I am only having problems plotting the blue shade and the blue lines.
Lyft's user avatar
  • 1
0 votes
0 answers
20 views

How to get a complete and up-to-date list of ticker symbols for any Yahoo Finance index? [duplicate]

Good afternoon everyone, I am currently in a dilemma to which I have tried to find a solution for a whole week but unfortunately I have come to nothing. I have tried to locate a library or create a ...
Luis David's user avatar
1 vote
1 answer
181 views

Reverse optimization: How to generate the expected portfolio returns given the weights and a series of constraints on those weights?

I have the below function in Python. My objective is to back out the expected returns associated with certain portfolio weights given a series of assumptions. From this I want to generate the expected ...
Farrep7's user avatar
  • 21
1 vote
0 answers
81 views

Setting up QuantLib to get correct yield for bond with long first payment period

I am dealing with fixed rate bonds. There is one particular bond, 34659UAC0, that caught my eye. This bond has a first coupon period of a whopping 5 years, followed by regular periods of 6 months. My ...
Jerry's user avatar
  • 11
0 votes
2 answers
169 views

QuantLib Python: Calculate ZSpread

I am trying to use quantlib-python to calculate the z-spread of a fixed rate US corporate bond using a zero curve from swap rates provided. Here is the provided ...
cpage's user avatar
  • 64
0 votes
0 answers
38 views

YUIMA: Drift and diffusion parameters must be different?

I am currently working with the Yuima package and trying the estimate the parameters of a CARMA(p,q) model to real data. Using the eacf function of the TSA package a ARMA (2,1) process is recommended ...
Valentin's user avatar
  • 135
0 votes
1 answer
158 views

Portfolio optimization with Scipy in Python

I performed Scipy portfolio optimization in two scenarios: 1) when I cannot lend or borrow at the risk-free rate; 2) when I can lend and borrow at rf=1.5%. Now, optimal risky portfolio weights anyway ...
Maurizio Marinaro's user avatar
0 votes
0 answers
31 views

Getting standardized residuals from MSGARCH in R

After estimation by the MSGARCH package in R, I couldn't find a way to extract residuals from the estimation results. Anyone know how to extract the residuals from MSGARCH package in R? Thanks!
Frank Cheng's user avatar
0 votes
0 answers
62 views

Is there any way to view historical data on market capitalization?

Is there any way to view historical data on market capitalization? I would like to calculate a market capitalization weighted index with only the top 10 nasdaq stocks (like nasdaq 10). I have tried ...
nokemono's user avatar
1 vote
1 answer
301 views

GBP OIS Curve - Zero Rate Curve Calculation in Quantlib

I am new to Quantlib and I am looking to create a Zero Rate Curve from GBP OIS to then use to calculate the present value of fixed rate bonds. I have Looked at the documentation: https://quantlib-...
TheGr8Destructo's user avatar
0 votes
0 answers
26 views

Got different results using SEC EDGAR API and Seeking Alpha

I am trying to get the same Depreciation and Amortization (Total) we can get for AAPL on Seeking Alpha and QuickFS for instance. Here is what is their values: However, what I am getting using the SEC ...
J.Doe's user avatar
  • 73
0 votes
0 answers
57 views

Barrier option Greeks using AD

I am trying to price a Down-and-Out Barrier option using Monte Carlo and get the Greeks using autodiff as provided by PyTorch. However, comparing the output to bumping, I get vastly different values ...
nducl's user avatar
  • 1
1 vote
2 answers
194 views

fast backtesting library in R

I’m looking for a fast library for backtest in R that supports limit orders, stop-losses, and take-profits. The library should be optimized for repeated historical testing and ideally ported from fast ...
mr.T's user avatar
  • 125
0 votes
1 answer
39 views

Is End of Month (Eom) Rule overrides Unadjusted convention rule in Quantlib?

Concerning the post Is End of Month (Eom) Rule overrides convention rule in Quantlib Schedule? I noticed that with Unadjusted convention has the same behavior. Is this wanted? For example, with Target ...
Alessandro Ruo Bernucchio's user avatar
1 vote
0 answers
78 views

Python Quantlib Loop to calculate cap prices: Setting of evaluationDate

I am trying to calculate cap prices for different points in time (valuation dates) with Quantlib. I have built three loops for this. The first one creates the quantlib yield curve object ts_handle ...
Marc157's user avatar
  • 55
4 votes
1 answer
243 views

To estimate the parameters when only the characteristic function is known to us

Recently I was working with a process named Variance Gamma with Stochastic Arrival (VGSA) and trying to fit this process on a given data. To obtain VGSA, as explained in Carr et al. [2001], we take ...
Starlord22's user avatar
0 votes
1 answer
145 views

Why is my Risk Neutral Density recovery failing?

I'm working on a project to recover a known Risk Neutral Density from option prices, using the Breeden-Litzenberger formula (assuming a continuum of option_price(strike_price), the second derivative ...
v.y.'s user avatar
  • 31

1
2 3 4 5
24