Metadata-Version: 2.1
Name: macrosynergy
Version: 0.0.14
Summary: Macrosynergy Quant Research Package
Home-page: https://www.macrosynergy.com
Author: Macrosynergy Ltd
Author-email: info@macrosynergy.com
Maintainer: Macrosynergy
Maintainer-email: info@macrosynergy.com
License: MIT License
Download-URL: https://github.com/macrosynergy/macrosynergy
Project-URL: Bug Tracker, https://github.com/macrosynergy/macrosynergy/issues
Project-URL: Source Code, https://github.com/macrosynergy/macrosynergy
Description: ![Macrosynergy](docs/source/_static/MACROSYNERGY_Logo_Primary.png)
        
        # Macrosynergy Quant Research
        [![PyPI Latest Release](https://img.shields.io/pypi/v/macrosynergy.svg)](https://pypi.org/project/macrosynergy/)
        [![Package Status](https://img.shields.io/pypi/status/macrosynergy.svg)](https://pypi.org/project/macrosynergy/)
        [![License](https://img.shields.io/pypi/l/macrosynergy.svg)](https://github.com/macrosynergy/macrosynergy/blob/master/LICENSE)
        [![Downloads](https://static.pepy.tech/personalized-badge/macrosynergy?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/macrosynergy)
        [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
        
        Macrosynergy research package contains 5 subpackages:
        
        1. [management](./macrosynergy/management): simulates, analyses and reshapes standard quantamental dataframes.
        2. [panel](./macrosynergy/panel): analyses and visualizes panels of quantamental data.
        3. [signal](./macrosynergy/signal): transforms quantamental indicators into trading signals and does naive analysis.
        4. [pnl](./macrosynergy/pnl): constructs portfolios based on signals, applies risk management and analyses realistic PnLs.
        5. [dataquery](./macrosynergy/dataquery): interface for donwloading data from JP Morgan DataQuery, with main module [api.py](./macrosynergy/dataquery/api.py). 
        
        ## Installation
        The easiest method for installing the package is to use the [PyPI](https://pypi.org/project/macrosynergy/) installation method:
        ```shell script
        pip install macrosynergy
        ```
        Alternatively, we you want to install the package directly from the [GitHub repository](https://github.com/macrosynergy/macrosynergy/tree/main) using
        ```shell script
        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](https://github.com/macrosynergy/macrosynergy/tree/develop) branch as
        ```shell script
        pip install https://github.com/macrosynergy/macrosynergy@development
        ```
        ## Usage
        ### DataQuery Interface
        To download data from JP Morgan DataQuery, you can use the DataQuery [Interface](./macrosynergy/dataquery/api.py)
        together with your OAuth authentication credentials:
        ```python
        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:
        ```python
        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.
Platform: Windows
Platform: Linux
Platform: Mac OS-X
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS
Requires-Python: >=3.6
Description-Content-Type: text/markdown
