Questions tagged [computational-finance]

Use this tag for questions related to Computational Finance, a branch of applied computer science that deals with problems of practical interest in finance.

Some slightly different definitions are the study of data and algorithms currently used in finance and the mathematics of computer programs that realize financial models or systems.

57 questions
1
vote
1 answer

Plotting gBM issues

Geometric Brownian motion (gBM) is a stochastic process and can be thought of as an extension of standard Brownian motion. I am trying to write a function that simulates different paths (ntraj paths) of gBM and then plots a histogram at certain…
user4933
  • 1,485
  • 3
  • 24
  • 42
1
vote
0 answers

Python - How evaluate Internal Rate of Return (IRR) trough interpolation for an array of generic dimension

Iìm working with Python and I would to define a function which allow to evaluate the internal rate of return (IRR) of a generic investment project trough the interpolation method. I know there are several module available which allow to evaluate it…
1
vote
0 answers

Cora-3 algorithm to develop bubble index alarm

I have read a thesis which used Cora-3 algorithm to develop the Forex market bubble alarm index (link attached, page 33 -…
1
vote
1 answer

How to use a matrix as an input in a User-Defined Function and Loop it in R?

Here is the current script I have: delta <- 1/52 T <- 0.5 S0 <- 25 sigma <- 0.30 K <- 25 r <- 0.05 n <- 1000000 m <- T/delta S <- numeric(m + 1) S[1] <- S0 #Payoff asian option asian_option_price <- function() { for(j in 1:m) { W <- rnorm(1) …
Jeremi
  • 11
  • 2
1
vote
1 answer

Finding Where Put Option Equals K-S, using the Black-Sholes, throws Exceptions. Why?

I am trying to find the value of the S where a Put option equals K-S in Python, where K is the strike price of the option and S is the underlying strike price. Also, in the function call of the Black-Sholes, sigma is the volatility, delta is the…
1
vote
1 answer

Of these four libraries, which are you most likely to use?

I'm trying to pick out my next hackery project. It'll likely be one of the following: A sparse radix trie Implementation with extremely fast set operations A really good soft heap implementation A bloomier filter implementation A collection of…
Jake Kurzer
  • 1,532
  • 4
  • 16
  • 25
1
vote
3 answers

Calculating investment duration in Java using simple interest formula

So the task that Im trying to do is to find the number of years taken for a principal to reach a certain value. say for example I start with $5000 and I want to accumulate $15000 with 10% interest rate/year. I want to find how long is the duration…
Yusuf Ning
  • 65
  • 1
  • 2
  • 9
1
vote
1 answer

C4430 missing type specifier - int assumed

I'm trying to code Put-Call Parity function in CallOption and PutOption derived class. I'd like this function passes the reference of the object as argument. This is the signature of the function in the CallOption.hpp double PCParity(const…
QFi
  • 281
  • 1
  • 3
  • 13
1
vote
1 answer

Maximixing Sharpe Ratio Matlab using Cplex

I am working on a problem where I need to find a rebalanced portfolio based on maximizing the Sharpe ratio using IBM Cplex tool in Matlab. From what I think, I have added all conditions and constraints, but when I try to solve it, I get integer…
1
vote
1 answer

How to estimate static yield curve with 'termstrc' package in R?

I am trying to estimate the static yield curve for Brazil using termstrc package in R. I am using the function estim_nss.couponbonds and putting 0% coupon-rates and $0 cash-flows, except for the last one which is $1000 (the face-value at maturity)…
1
vote
0 answers

Finding repeating patterns in multi-variate data

Say I have the following dataset: time_m = {A:1, B:2, C:3, D:10}; time_n = {A:6, B:2, C:12, D:18}; time_p = {A:1, B:2, C:9, D:17}; time_q = {A:1, B:2, C:9, D:2}. As you can see, I have 4 variables A, B, C, D whose values are measured at…
1
vote
1 answer

QSTK EventProfiler runtime error

When I ran QSTK EventProfiler tutorial, I have the following warning and I cannot even got the myEventStudy.pdf chart.The code was just stuck there. Having difficulty ruling out the problem. Can anyone please help figure out what is the issue here?…
1
vote
1 answer

Trinomial tree in Python

I am struggling with implementing trinomial tree in Python. I have found very nice solution (and vectorized version) for binomial tree and I am trying to change it for a trinomial case. Here is what I've got: def Trinomial(type, S0, K, r, sigma,…
Photon Light
  • 757
  • 14
  • 26
1
vote
1 answer

Error Correction methodologies Time Series Forecast

Do you have any readings recommendation on correcting forecast bias? For example, I use an ARIMA model to predict a time series. Is there a way based on the backtesting results to correct the bias of the forecast?
1
vote
0 answers

Design: Mixed XML / Relational or Pure Relational?

Is it acceptable to model a very complex object graph using XML in the database, but leave the rest of a system in relational tables? I'd like to gauge opinion on this as I've hit a bit of a conundrum. Many thanks -------------------- Background I'm…