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
12
votes
2 answers

out of sample definition

Can anyone explain the difference between “in-sample” and “out-of-sample” forecasts?
12
votes
8 answers

Required math for Computational Finance?

I don't have a strong mathematical background, but I would love to work on some computational finance problems. I got "An Introduction to Computational Finance Without Agonizing Pain " by Peter Forsyth, but it still was pretty hard for me to follow…
unj2
  • 52,135
  • 87
  • 247
  • 375
11
votes
1 answer

How do I optimise this Haskell limit order book (with code, reports, graphs)?

I've written a haskell version of a limit order book, referencing this version written in C: https://github.com/jordanbaucke/Limit-Order-Book/blob/master/Others/C%2B%2B/engine.c A limit order book is the mechanism many stock and currency exchanges…
6
votes
2 answers

Estimation of rolling Value at Risk (VaR) using R

I need to perform rolling VaR estimation of daily stock returns. At first I did the following: library(PerformanceAnalytics) data(edhec) sample<-edhec[,1:5] var605<-rollapply(as.zoo(sample),width=60,FUN=function(x)…
6
votes
7 answers

How to design a programming language adapted to financial instruments?

I work for a boutique specialized in finance. We thought about designing a language to describe financial entities related to financial markets. This would be mainly used as some kind of scripting language to replace many process run in spreadsheets…
BlueTrin
  • 9,610
  • 12
  • 49
  • 78
4
votes
5 answers

Data To Munge: Stock Trading, Exchange Trading

I know that a lot of this information is probably entirely privatized, but does anyone know of a good source of real time information on what kind of trading activity is where in the market? It doesn't need to be fast enough to actually make…
3
votes
1 answer

How to Download Multiple Stocks Using Yahoo API v11

How can I download multiple symbols using Yahoo Finance API version >= 8? As you can see here I can download multiple stocks with version 7, but from version 8 onwards they changed…
Nerva
  • 329
  • 4
  • 13
3
votes
3 answers

Panda runtime warning Cannot compare type 'Timestamp' with type 'str', sort order is undefined for incomparable objects

I am currently working on homework 2 for the coursera computational finance. While executing this line: ep.eventprofiler(df_events, d_data, i_lookback=20, i_lookforward=20, s_filename=report_filename, b_market_neutral=True,…
Matt
  • 674
  • 11
  • 25
3
votes
2 answers

How to plot custom hourly data into R with quantmod?

I'm trying to get into R because for some personal project, I need R and quantmod to create OHCL charts for me. I'm stuck at the candleChart creation step, and I'm not sure I understand why. Using a 'daily' input file works fine, but trying to…
RitonLaJoie
  • 211
  • 3
  • 5
2
votes
1 answer

Calculate bond yield to maturity (YTM) in C++

I want to calculate bond's yield to maturity given price using either the bisection or the secant method. I know there's C++ recipes online for this, but I can't figure out what's wrong with my own code. Both methods create an infinite loop. When I…
cona
  • 169
  • 1
  • 13
2
votes
3 answers

Is there a standard database format for financial information of a company ?

Is there any standard format with which Companies/Stock Exchanges use to communicate financial data? Like Balance Sheet, Income Cash Flow etc. Some of these data are submitted to Securities Board using formats like EDGAR. But what is generally the…
Nishant
  • 20,354
  • 18
  • 69
  • 101
1
vote
2 answers

pl/python receiving and outputting a set of rows

Problem description: I'm trying to define a pl/python aggregator that receives a set of rows and returns a set of rows, for every set of rows generated from a query. The input set of rows should be a group generated with the group by statement in a…
Trylks
  • 1,458
  • 2
  • 18
  • 31
1
vote
1 answer

How to assign multiple variables in a loop for graphs in Python 3

I am relatively new to coding and I have a few issues I don't quite understand how to solve, yet. I'm trying to build code that will make graphs that will produce from a ticker list, with the data downloading from yahoo finance. Taking out of…
1
vote
2 answers

How to make dictionary to output by max value only (implied_volatility)?

So the dictionary titled 'option' spits out the result (tradeable options) below by strike_price, ask_price, delta and implied_volatility. But I don't need it to spit out all of the tradeable options. I only want the output to show me 1 tradeable…
Kam Halil
  • 35
  • 7
1
vote
0 answers

How can I build a dynamic hedging when jumps occur with python?

I want to build a dynamic hedging strategy when jumps occur. In litterature we have to include another option to reduce the impacts due to the jumps, which is another source of risk. I tried to find a code, or similar one, written in python, but I…
ptf
  • 19
  • 2
1
2 3 4