Skip to content

Commit

Permalink
New version 1.5.2 (#108)
Browse files Browse the repository at this point in the history
- Corrected typing.Literal on weight strategies that were removed in 1.5.1
- Lower cased project name throughout to remove any confusion
- Added Self typing where missing in types.py
- Miscellaneous development dependencies update. Minimal related changes.
  • Loading branch information
karrmagadgeteer2 authored Apr 16, 2024
1 parent 859e234 commit 16ee89d
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 38 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
At some point we will start documenting changes in release documentation instead.
For now this is the only place where we log summary descriptions.

## Version [1.5.2] - 2024-04-16

- Corrected typing.Literal on weight strategies that were removed in 1.5.1
- Lower cased project name throughout to remove any confusion
- Added Self typing where missing in types.py
- Miscellaneous development dependencies update. Minimal related changes.

## Version [1.5.1] - 2024-03-30

- Removed two weight strategies in OpenFrame.make_portfolio() to remove ffn as dependency.
Expand Down Expand Up @@ -194,12 +201,12 @@ A significant change that will hopefully not break anything backwards as it is a
rebuild to remove as much duplicate code as possible. This has been achieved by
introducing a new base class that OpenTimeSeries and OpenFrame inherits properties
and methods from, while still also inheriting from the Pydantic BaseModel.
Further described in [issue 41](https://github.com/CaptorAB/OpenSeries/issues/41).
Further described in [issue 41](https://github.com/CaptorAB/openseries/issues/41).

## Version [1.1.7] - 2023-08-11

Changed the Pydantic configuration which will improve popup docs in e.g. Pycharm.
Also resolved issue [#35](https://github.com/CaptorAB/OpenSeries/issues/35) with
Also resolved issue [#35](https://github.com/CaptorAB/openseries/issues/35) with
nested decorator warning.

## Version [1.1.6] - 2023-08-08
Expand Down Expand Up @@ -291,7 +298,7 @@ Fixed typing the inputs for OpenFrame methods

Aligned code to pass many of the type checks performed by `mypy`. A list of error
codes are for now silenced in the project's
[pyproject.toml](https://github.com/CaptorAB/OpenSeries/blob/master/pyproject.toml)
[pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml)
file.

## Version [0.11.4] - 2023-03-19
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Pull requests are the best way to propose changes to the codebase and are welcom
In short, when you submit code changes, your submissions are understood to be under the same [BSD 3-Clause License](https://opensource.org/license/bsd-3-clause/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's issues
GitHub issues are used to track public bugs. Report a bug by [opening a new issue](https://github.com/CaptorAB/OpenSeries/issues/new/choose).
GitHub issues are used to track public bugs. Report a bug by [opening a new issue](https://github.com/CaptorAB/openseries/issues/new/choose).

## Write bug reports with detail, background, and sample code
Use a clear and descriptive title.
Expand All @@ -36,7 +36,7 @@ Provide information about your environment, such as your operating system or app
If possible, try to isolate the issue to a specific code block or function.

## Use a Consistent Coding Style
Two tools are used for styling and linting and their configurations are kept in the project's [pyproject.toml](https://github.com/CaptorAB/OpenSeries/blob/master/pyproject.toml) file. They are:
Two tools are used for styling and linting and their configurations are kept in the project's [pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml) file. They are:

* Ruff linting
* Mypy type checking
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ width="81" height="100" align="left" float="right"/><br/>
[![Conda version](https://img.shields.io/conda/vn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
[![Conda platforms](https://img.shields.io/conda/pn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
[![Python version](https://img.shields.io/pypi/pyversions/openseries.svg)](https://www.python.org/)
[![GitHub Action Test Suite](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
[![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/OpenSeries@master/coverage.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
[![Styling, Linting & Type checks](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml)
[![GitHub Action Test Suite](https://github.com/CaptorAB/openseries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
[![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/openseries@master/coverage.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
[![Styling, Linting & Type checks](https://github.com/CaptorAB/openseries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/check.yml)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://beta.ruff.rs/docs/)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

`openseries` is a project with tools to analyse financial timeseries of a single
asset or a group of assets. It is solely made for daily or less frequent data.

<span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/OpenSeries/blob/master/CHANGELOG.md)</span>
<span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/openseries/blob/master/CHANGELOG.md)</span>


## Basic Usage
Expand Down Expand Up @@ -102,17 +102,17 @@ on any attributes or methods inherited from this model.
### Windows Powershell

```powershell
git clone https://github.com/CaptorAB/OpenSeries.git
cd OpenSeries
git clone https://github.com/CaptorAB/openseries.git
cd openseries
./make.ps1 make
```

### Mac Terminal/Linux

```bash
git clone https://github.com/CaptorAB/OpenSeries.git
cd OpenSeries
git clone https://github.com/CaptorAB/openseries.git
cd openseries
make
source source_me
make install
Expand All @@ -125,7 +125,7 @@ Ruff and Mypy checking is embedded in the pre-commit hook. Both
are also used in the project's GitHub workflows and are run when the `lint`
alternative is chosen in the below commands.
Any silenced error codes can be found in the
[pyproject.toml](https://github.com/CaptorAB/OpenSeries/blob/master/pyproject.toml)
[pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml)
file or in in-line comments.

### Windows Powershell
Expand Down Expand Up @@ -165,9 +165,9 @@ make lint

| File | Description |
|:-----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [series.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
| [frame.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
| [simulation.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |
| [series.py](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
| [frame.py](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
| [simulation.py](https://github.com/CaptorAB/openseries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |

### Class methods used to construct objects.

Expand All @@ -178,7 +178,7 @@ make lint
| `from_fixed_rate` | `OpenTimeSeries` | Class method to create an OpenTimeSeries object from a fixed rate, number of days and an end date. |
| `from_deepcopy` | `OpenTimeSeries`, `OpenFrame` | Creates a copy of an OpenTimeSeries object. |

### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.

| Property | type | Applies to | Description |
|:----------------|:----------------|:-----------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -195,7 +195,7 @@ make lint
| `countries` | `list` or `str` | `OpenTimeSeries` | (List of) country code(s) according to ISO 3166-1 alpha-2 used to generate business days. |
| `valuetype` | `ValueType` | `OpenTimeSeries` | Field identifies the type of values in the series. ValueType is an Enum. |

### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.

| Property | type | Applies to | Description |
|:-------------------|:-----------------------|:------------|:-------------------------------------------------------------------------|
Expand All @@ -209,7 +209,7 @@ make lint
| `lengths_of_items` | `pandas.Series` | `OpenFrame` | Number of items in each of the series in the OpenFrame. |
| `span_of_days_all` | `pandas.Series` | `OpenFrame` | Number of days from the first to the last in each of the series. |

### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.

| Property | type | Applies to | Description |
|:--------------------|:---------------------------------|:------------------------------|:----------------------------------------------------------------------------------|
Expand All @@ -222,7 +222,7 @@ make lint
| `periods_in_a_year` | `float` | `OpenTimeSeries`, `OpenFrame` | The number of observations in an average year for all days in the data. |
| `yearfrac` | `float` | `OpenTimeSeries`, `OpenFrame` | Length of timeseries expressed as np.float64 fraction of a year with 365.25 days. |

### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.

| Method | Applies to | Description |
|:-------------------------|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -234,7 +234,7 @@ make lint
| `from_1d_rate_to_cumret` | `OpenTimeSeries` | Converts a series of 1-day rates into a cumulative valueseries. |
|

### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.

| Method | Applies to | Description |
|:------------------------|:------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -255,7 +255,7 @@ make lint
| `rolling_corr` | `OpenFrame` | Calculates and adds a series of rolling [correlations](https://www.investopedia.com/terms/c/correlation.asp) between two other series. |
| `ewma_risk` | `OpenFrame` | Returns a `pandas.DataFrame` with volatility and correlation based on [Exponentially Weighted Moving Average](https://www.investopedia.com/articles/07/ewma.asp). |

### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.

| Method | Applies to | Description |
|:-----------------------------------|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -280,7 +280,7 @@ make lint
| `rolling_cvar_down` | `OpenTimeSeries`, `OpenFrame` | Returns a pandas.DataFrame with rolling CVaR figures. |
| `calc_range` | `OpenTimeSeries`, `OpenFrame` | Returns the start and end dates of a range from specific period definitions. Used by the below numerical methods and not meant to be used independently. |

### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py).
### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py).

| Property | type | Applies to | Description |
|:------------------------|:-------------------------|:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Without an x next to a version below you can assume that it works as intended.

| Version | Supported |
|---------|--------------------|
| 1.5.2 | :white_check_mark: |
| 1.5.1 | :white_check_mark: |
| 1.5.0 | :white_check_mark: |
| 1.4.12 | :white_check_mark: |
Expand Down
2 changes: 1 addition & 1 deletion openseries/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""OpenSeries.openseries.__init__.py."""
"""openseries.openseries.__init__.py."""
Loading

0 comments on commit 16ee89d

Please sign in to comment.