Skip to main content

Network Informed Restricted Vector Autoregression

Project description

NIRVAR

Network Informed Restricted Vector Autoregression

This repository contains the code and data used to obtain simulation study and applications results for the NIRVAR paper.

Note that the financial returns data is too large to store on GitHub. The data is available upon request from b.martin22@imperial.ac.uk.

Installation

You can install from pypi.org using pip install nirvar

Alternatively, you can clone the repository using SSH or HTTPS:

git clone git@github.com:bmartin9/NIRVAR.git

or

git clone https://github.com/bmartin9/NIRVAR.git

Once cloned, change to the project root directory and install the nirvar package in edit mode using

pip install -e .

Usage

If you have installed using pip, you can import classes and functions using, for example

from nirvar.models import train_model

If you have cloned the repository from GitHub and installed it in editable mode, use src instead of nirvar. For example,

from src.models import train_model

Project Organization

├── LICENSE            <- MIT
├── Makefile           <- Makefile based on cookiecutter data-science template
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── generated      <- Data generated from simulation studies
│   ├── processed      <- Transformed data used for model training
│   └── raw            <- The original, immutable data dump.
│
├── docs               <- A default Sphinx project; see sphinx-doc.org for details
│
├── models             <- Scripts for training NIRVAR/FARM/FNETS/GNAR models on application datasets.
                          Also contains scripts for NIRVAR simulation studies.
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment
│
├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
├── src                <- Source code for use in this project.
│   ├── __init__.py    <- Makes src a Python module
│   │
│   ├── data           <- Scripts to transform data for applications 
│       └── clean_stocks.py
│       └── transform_raw_data.R
│   │
│   ├── models         <- Scripts to generate simulation data, train a NIRVAR model on data, and do predictions 
│   │                     using trained model
│   │   ├── generativeVAR.py
│   │   └── train_model.py
    |   └── predict_model.py
│   │
│   └── visualization  <- Scripts to visualize results 
│       └── 0.3-ARI-comparisons.py
│       └── 0.3-embedding-dim.py
│       └── 0.3-SICCD-bars-plot.py
│       └── 0.3-turnover.py
│       └── 0.3-visualise-backtesting.py
│       └── factors_over_time.py
│       └── utility_funcs.py
│
└── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

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

nirvar-1.1.0.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

nirvar-1.1.0-py3-none-any.whl (55.7 kB view details)

Uploaded Python 3

File details

Details for the file nirvar-1.1.0.tar.gz.

File metadata

  • Download URL: nirvar-1.1.0.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for nirvar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7830c8b5f97a52f009e82e01f05d27b2c7c907fb5edc1b7d3d4f45c96e00bfe4
MD5 7e58dcdb3761812136944024f447895f
BLAKE2b-256 21f804eaf25d66cd945484ccdb01bdd8f892a9e30afaea3bcec73da216e71523

See more details on using hashes here.

File details

Details for the file nirvar-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: nirvar-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for nirvar-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3f6de39789f272291993e1f7689ff8f4d80d6c5fc37c0e3ec57a047dc71bc35
MD5 4f178f058010963f32433e96dd4775fe
BLAKE2b-256 c1c16fd2726a417f272135d47e8af6f028240cb14fdc0bd00d928db91448ce84

See more details on using hashes here.

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