Macrosynergy Quant Research Package
Project description
Macrosynergy Quant Research
Macrosynergy research package contains 5 subpackages:
- management: simulates, analyses and reshapes standard quantamental dataframes.
- panel: analyses and visualizes panels of quantamental data.
- signal: transforms quantamental indicators into trading signals and does naive analysis.
- pnl: constructs portfolios based on signals, applies risk management and analyses realistic PnLs.
- dataquery: interface for donwloading data from JP Morgan DataQuery, with main module api.py.
Installation
The easiest method for installing the package is to use the PyPI installation method:
pip install macrosynergy
Alternatively, we you want to install the package directly from the GitHub repository using
pip install https://github.com/macrosynergy/macrosynergy@main
for the latest stable version. Alternatively for the cutting edge development version, install the package from the develop branch as
pip install https://github.com/macrosynergy/macrosynergy@development
Usage
DataQuery Interface
To download data from JP Morgan DataQuery, you can use the DataQuery Interface together with your OAuth authentication credentials:
import pandas as pd
from macrosynergy.dataquery import api
with api.Interface(
oauth=True,
client_id="<dq_client_id>",
client_secret="<dq_client_secret>"
) as dq:
data = dq.download(tickers="EUR_FXXR_NSA", start_date="2022-01-01")
assert isinstance(data, pd.DataFrame) and not data.empty
assert data.shape[0] > 0
data.info()
Alternatively, you can also the certificate and private key pair, to access DataQuery as:
import pandas as pd
from macrosynergy.dataquery import api
with api.Interface(
oauth=False,
username="<dq_username>",
password="<dq_password>",
crt="<path_to_dq_certificate>",
key="<path_to_dq_key>"
) as dq:
data = dq.download(tickers="EUR_FXXR_NSA", start_date="2022-01-01")
assert isinstance(data, pd.DataFrame) and not data.empty
assert data.shape[0] > 0
data.info()
Both of the above example will download a snippet of example data from the premium JPMaQS dataset of the daily timeseries of EUR FX excess returns.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for macrosynergy-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad5b426f86b38fd5e4a774ec399ec9cef4335a75867381a91b44850de89c096f |
|
MD5 | 8d5707ce51535d37cd43a8a5087c08f8 |
|
BLAKE2b-256 | 06e39c6bb6db372f32041cd2d04301815a9a310eb5f37328637c9d1d70e9bb53 |