Skip to main content

Persistent Objectified Indexed Data

Project description

Join the chat at https://gitter.im/Equitable/trump Documentation Status

Persistent Objectification of Indexed Data

Trump is a framework for objectifying data, with the goal of centralizing the responsibility of managing feeds, munging, calculating and validating data, upstream of any application or user requirement.

With a focus on business processes, Trump’s long run goals enable data feeds to be:

  • Prioritized, flexibly - a symbol can be associated with multiple data source for a variety of reasons including redundancy, calculations, or optionality.

  • Modified, reliably - a symbol’s data feeds can be changed out, without any changes requiring testing to the downstream application or user.

  • Verified, systematically - a variety of common data processing checks are performed as the symbol’s data is cached.

  • Audited, quickly - alerts and reports all become possible to assess integrity or inspect where manual over-rides have been performed.

  • Aggregated, intelligently - on a symbol by symbol basis, feeds can be combined and used in an extensible number of ways.

  • Customized, dynamically - extensibility is possible at the templating, munging, aggregation, and validity steps.

Planning

Trump is still in a planning stage. Trump’s initial priority is numeric and monotonic timeseries data, but written with the future in mind to eventually work with any sortable object as data, and any object as an index. Eliminating the monotonic assumption is a very low priority.

See docs/planning.md for the current state of the project.

Basic Usage

This example dramatically understates the utility of Trump’s long term feature set.

Adding a Symbol

from trump.orm import SymbolManager
from trump.templating import fQuandl, fSQL

sm = SymbolManager()

oil = sm.create(name = "oil_front_month",
                description = "Crude Oil",
                freq = 'D',
                units = '$ / barrel')

oil.addTags(['commodity','oil','futures'])

f1 = fQuandl(r"CHRIS/CME_CL2",fieldname='Settle')
f2 = fSQL("SELECT date,data FROM test_oil_data;")

oil.addFeed(f1)
oil.addFeed(f2)

oil.cache()

print oil.df.tail()

Using a Symbol

from trump.orm import SymbolManager

sm = SymbolManager()

oil = sm.get("oil_front_month")

#optional
oil.cache()

print oil.df.tail()

Installation

See the latest Installation instructions on ReadTheDocs.org

Requirements

  • Python 2.7; Support for Python 3.3 or 3.4 is do-able, if there is demand.

  • A relational database supported by SQLAlchemy. The first database with guaranteed support is PostGreSQL.

Dependencies

Data Source Dependencies

Documentation

Read the latest on ReadTheDocs.org

Communication

  • Questions, Bugs, Ideas & Requests -> GitHub Issues or InvTech@equitable.ca

  • Contribute Code -> New Branch + GitHub Pull Request

  • Chat -> Gitter

License

BSD-3 clause. See the actual License.

Background

The prototype for Trump was built at Equitable Life of Canada in 2014 by Jeffrey McLarty, CFA and Derek Vinke, CFA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Trump-0.0.1.zip (29.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page