Giter Club home page Giter Club logo

aleatory's Introduction

Hello world โœจ I'm Dialid

I am a mathematician working as a Quantitative Analyst at an investment bank in London. In my free time, I create open source projects and write about financial mathematics, programming, statistics, data visualisation, and other related topics.

Currently, I am:

Please visit my personal site Quant Girl and connect with me via:

aleatory's People

Contributors

quantgirluk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aleatory's Issues

Paths fail to plot when there is only 1 histogram bin

Very nice package! I'm learning stochastic calculus and this is a really cool tool!

I found a small bug:
The paths plotted by SPExplicit.draw() are colored to match the histogram bin that their final point falls into.
If we plot N=3 or fewer paths, then we set n_bins = int(np.sqrt(N)) <= 1, and then this logic which helps set the path colors:

bin_centers = 0.5 * (bins[:-1] + bins[1:])
col = bin_centers - min(bin_centers)  # scale values to interval [0,1]
col /= max(col)

results in a divide by zero

/Users/alexrubin/code/aleatory/aleatory/utils/utils.py:76: RuntimeWarning: invalid value encountered in divide
    col /= max(col)

because col == [0.].

image

It seems like the 3 lines of logic above could be replaced by col = np.linspace(0, 1, n_bins, endpoint=True).

Add functionality for the CKLS process

Modelling hashtag#short_term_interest_rates sometimes requires the hashtag#stochastic_model to be defined as the solution to a stochastic differential equation, so it is necessary to perform a time discretisation and then simulate the random component. Attached is an algorithm for simulating the path of a process called CKLS, which is a generalisation of several well-known processes, such as Brownian motion, the Ornstein-Uhlenbeck process, CIR, and so on.

[1] CHAN, K. C., KAROLYI, G. A., LONGSTAFF, F. A., & SANDERS, A. B. (1992).
An Empirical Comparison of Alternative Models of the Short-Term Interest Rate. The Journal of Finance, 47(3), 1209โ€“1227.

multivariate support in aleatory?

Hi there -

Very impressive package and thank you for making public!

I had an enhancement question.

Was curious if this package is planned to support multivariate processes? If I say have X commodities following various processes, with correlated random shocks.

Say two commodities, define one as GBM and the other as UO, with 70% correlation in their random draw direction. Is something like this currently feasible or something in the future plans?

My background in stochastic processes is in R, and can only point to MASS::mvrnorm as an example of the correlated draws.

Cheers!

Mistake in Vasicek definition?

Hi, I liked your package, thank you!

I believe there is a mistake in the Vasicek function

def g(x, _): return self.sigma

It should be

def g(x, _): return self.sigma * x

right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.