janushendersonassetallocation / loman

Loman is a Python library designed to allow quantitative researchers to control complex live updating calculation processes
BSD 3-Clause "New" or "Revised" License
95 stars 13 forks source link

Loman

PyPI - Version PyPI - Wheel PyPI - Python Version PyPI - License Github - Test Status ReadTheDocs

Loman tracks the state of your computations, and the dependencies between them, allowing full and partial recalculations.

Example

>>> comp = Computation()
>>> comp.add_node('a')
>>> comp.add_node('b', lambda a: a+1)
>>> comp.add_node('c', lambda a, b: 2*a)
>>> comp.add_node('d', lambda b, c: b + c)
>>> comp.add_node('e', lambda c: c + 1)
>>> comp.compute('d') # Will not compute e unnecessarily
>>> comp.get_value_dict() # Can see all the intermediates
{'a': 1, 'b': 2, 'c': 2, 'd': 4, 'e': None}
>>> comp.draw_graphviz() # Can quickly see what calculated

Loman Graph Example

For further examples, take a look at the Quickstart.

Purpose

Loman makes it easy to ingest data from multiple sources, clean and integrate that data, and then use it to produce results for exporting to databases and other systems, as well as reports or dashboards for humans. Uses of Loman include:

The Introduction section of the documentation has more details on why Loman might be useful for you.

Installation

To install loman:

$ pip install loman

Or you can download from github: https://github.com/janusassetallocation/loman

Documentation

Up-to-date and thorough documentation is available on ReadTheDocs at http://loman.readthedocs.io/