• Stars
    star
    105
  • Rank 328,196 (Top 7 %)
  • Language
    Python
  • License
    Other
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bayesian models to compute performance and uncertainty of returns and alpha.

bayesalpha

BayesAlpha

Bayesian models for alpha estimation.

This project is no longer actively developed but pull requests will be evaluated.

Models

There are currently two models:

  • the returns model, which ingests a returns-stream. It computes (among other things) a forwards-looking gains parameter (which is basically a Sharpe ratio). Of interest is P(gains > 0); that is, the probability that the algorithm will make money. Originally authored by Adrian Seyboldt.

  • the author model, which ingests the in-sample Sharpe ratios of user-run backtests. It computes (among other things) average Sharpe delivered at a population-, author- and algorithm-level. Originally authored by George Ho.

Installation and Usage

To install:

git clone [email protected]:quantopian/bayesalpha.git
cd bayesalpha
pip install -e .

To use (this snippet should demonstrate 95% of all use cases):

import bayesalpha as ba

# Fit returns model
trace = ba.fit_returns_population(data, ...)
trace = ba.fit_returns_single(data, ...)

# Fit author model
trace = ba.fit_authors(data, ...)

# Save to netcdf file
trace.save('foo.nc')
del trace

# Load from netcdf file
trace = ba.load('foo.nc')

More Repositories

1

zipline

Zipline, a Pythonic Algorithmic Trading Library
Python
17,443
star
2

pyfolio

Portfolio and risk analytics in Python
Jupyter Notebook
5,596
star
3

alphalens

Performance analysis of predictive (alpha) stock factors
Jupyter Notebook
3,330
star
4

qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Python
3,034
star
5

research_public

Quantitative research and educational materials
Jupyter Notebook
2,400
star
6

empyrical

Common financial risk and performance metrics. Used by zipline and pyfolio.
Python
1,268
star
7

trading_calendars

Calendars for various securities exchanges.
Python
608
star
8

qdb

Quantopian Remote Debugger for Python
Python
315
star
9

quantopian-algos

Library of algorithm scripts for Quantopian
Python
174
star
10

pgcontents

A Postgres-backed ContentsManager implementation for Jupyter
Python
150
star
11

coal-mine

Coal Mine - Periodic task execution monitor
Python
114
star
12

algorithm-component-library

A collection of code snippets that can be constructed into larger trading algorithms.
Python
103
star
13

PenguinDome

Simple Linux Mobile Device Management
Python
90
star
14

libpy

Utilities for writing C++ extension modules.
C++
82
star
15

warp_prism

Quickly move data from postgres to numpy or pandas.
C
64
star
16

qgrid-notebooks

Notebooks which will provide a demo of Qgrid functionality
Jupyter Notebook
20
star
17

serializable-traitlets

JSON-Serializable IPython Traitlets
Python
13
star
18

metautils

Utilities for writing metaclasses.
Python
8
star
19

DockORM

An object-relational mapper for docker containers.
Python
8
star
20

quantopian-drafts

Drafts for new Quantopian features.
6
star
21

aqueduct-client

Python wrapper for Quantopian's Aqueduct API
Python
2
star
22

nose_xunit_gevent

Xunit for the nose_gevented_multiprocess plugin
Python
2
star
23

quantopian.github.io

CSS
1
star