Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0 #167

Merged
merged 137 commits into from
Aug 12, 2024
Merged

1.4.0 #167

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
2cd4118
WIP, redesigning forecast.py;
enzbus Jun 16, 2024
85f3bcf
getting shape
enzbus Jun 16, 2024
e219597
Merge branch 'master' into forecasts-improved
enzbus Jun 24, 2024
78d5cec
working it out
enzbus Jun 24, 2024
8ff86e7
getting closer
enzbus Jun 24, 2024
e48f8a1
getting closer;
enzbus Jun 24, 2024
19b6a96
only 4 tests fail of 170
enzbus Jun 24, 2024
c245881
[auto commit] ftse100_daily reconciliation & execution on 2024-07-11
enzbus Jul 11, 2024
8d22b20
[auto commit] dow30_daily reconciliation & execution on 2024-07-11
enzbus Jul 11, 2024
fd3f949
[auto commit] ndx100_daily reconciliation & execution on 2024-07-11
enzbus Jul 11, 2024
3dbd304
[auto commit] sp500_daily reconciliation & execution on 2024-07-11
enzbus Jul 11, 2024
f86f867
changing default branch for github CI testing;
enzbus Jul 11, 2024
ab12d5b
pyproject; unpinned Numpy;
enzbus Jul 11, 2024
5940ce0
retrying
enzbus Jul 11, 2024
3fb969f
Addressing #166
enzbus Jul 11, 2024
e7ae2f6
[auto commit] ftse100_daily reconciliation & execution on 2024-07-12
enzbus Jul 12, 2024
86713b7
[auto commit] dow30_daily reconciliation & execution on 2024-07-12
enzbus Jul 12, 2024
5012057
[auto commit] ndx100_daily reconciliation & execution on 2024-07-12
enzbus Jul 12, 2024
84caf6a
[auto commit] sp500_daily reconciliation & execution on 2024-07-12
enzbus Jul 12, 2024
418eab1
should have finished fixing
enzbus Jul 13, 2024
bea4e86
some docs cleaning;
enzbus Jul 13, 2024
2efb0c8
Merge branch 'main' into forecasts-improved
enzbus Jul 13, 2024
76311e3
Finishing redesign;
enzbus Jul 13, 2024
fd47db5
Readme, added instructions to install
enzbus Jul 13, 2024
1401093
minor readme, links
enzbus Jul 13, 2024
afa7d4f
should be last admin commit for #166;
enzbus Jul 13, 2024
01321fd
Merge branch 'main' into forecasts-improved
enzbus Jul 13, 2024
0c2cbc6
git merge master
enzbus Jul 13, 2024
471f4dc
rst;
enzbus Jul 13, 2024
924ae9b
minor text in rst
enzbus Jul 13, 2024
d2ebbc5
minor text in comment
enzbus Jul 13, 2024
1c73fa9
Merge branch 'main' into forecasts-improved
enzbus Jul 13, 2024
a0f33c3
added comment to a __init__ file
enzbus Jul 13, 2024
0bae094
Merge branch 'master'
enzbus Jul 13, 2024
520b8ca
added comment to a user contributed example
enzbus Jul 13, 2024
04abcfb
Merge branch 'main' into forecasts-improved
enzbus Jul 13, 2024
fef33cd
[auto commit] ftse100_daily reconciliation & execution on 2024-07-15
enzbus Jul 15, 2024
d5692c3
[auto commit] dow30_daily reconciliation & execution on 2024-07-15
enzbus Jul 15, 2024
125e80e
[auto commit] ndx100_daily reconciliation & execution on 2024-07-15
enzbus Jul 15, 2024
8538154
[auto commit] sp500_daily reconciliation & execution on 2024-07-15
enzbus Jul 15, 2024
cadbaea
[auto commit] ftse100_daily reconciliation & execution on 2024-07-16
enzbus Jul 16, 2024
ac728ec
moving docstrings to new implementations
enzbus Jul 16, 2024
9b8c1b2
[auto commit] dow30_daily reconciliation & execution on 2024-07-16
enzbus Jul 16, 2024
6a949b2
[auto commit] ndx100_daily reconciliation & execution on 2024-07-16
enzbus Jul 16, 2024
012fb26
[auto commit] sp500_daily reconciliation & execution on 2024-07-16
enzbus Jul 16, 2024
751bb84
more moving docstrings;
enzbus Jul 16, 2024
f8e60f3
another addition of lots of text
enzbus Jul 16, 2024
2686b26
*amend to last commit;
enzbus Jul 16, 2024
da99555
git merge main
enzbus Jul 16, 2024
f48e4d1
[auto commit] ftse100_daily reconciliation & execution on 2024-07-17
enzbus Jul 17, 2024
238a06e
[auto commit] dow30_daily reconciliation & execution on 2024-07-17
enzbus Jul 17, 2024
1718968
[auto commit] ndx100_daily reconciliation & execution on 2024-07-17
enzbus Jul 17, 2024
b529c01
[auto commit] sp500_daily reconciliation & execution on 2024-07-17
enzbus Jul 17, 2024
593e1bf
[auto commit] ftse100_daily reconciliation & execution on 2024-07-18
enzbus Jul 18, 2024
b1ca48a
removed old code; fixed 3 tests;
enzbus Jul 18, 2024
3f9cac3
[auto commit] dow30_daily reconciliation & execution on 2024-07-18
enzbus Jul 18, 2024
70752db
[auto commit] ndx100_daily reconciliation & execution on 2024-07-18
enzbus Jul 18, 2024
c72f76e
[auto commit] sp500_daily reconciliation & execution on 2024-07-18
enzbus Jul 18, 2024
f026789
tests pass;
enzbus Jul 18, 2024
8968509
Merge branch 'forecasts-improved' of github.com:cvxgrp/cvxportfolio i…
enzbus Jul 18, 2024
a8197c1
[auto commit] ftse100_daily reconciliation & execution on 2024-07-19
enzbus Jul 19, 2024
66a31c3
[auto commit] dow30_daily reconciliation & execution on 2024-07-19
enzbus Jul 19, 2024
abb7d1e
[auto commit] ndx100_daily reconciliation & execution on 2024-07-19
enzbus Jul 19, 2024
ed7ecb0
[auto commit] sp500_daily reconciliation & execution on 2024-07-19
enzbus Jul 19, 2024
724fd1a
acting on deprecation of readthedocs custom build
enzbus Jul 20, 2024
f8df6f2
Merge branch 'main' into forecasts-improved
enzbus Jul 20, 2024
ebd3ae4
trying RTD addons enabled through
enzbus Jul 20, 2024
9b66dfd
Merge branch 'main' into forecasts-improved
enzbus Jul 20, 2024
fa52284
[auto commit] ftse100_daily reconciliation & execution on 2024-07-22
enzbus Jul 22, 2024
b555be9
[auto commit] dow30_daily reconciliation & execution on 2024-07-22
enzbus Jul 22, 2024
8e8ba14
[auto commit] ndx100_daily reconciliation & execution on 2024-07-22
enzbus Jul 22, 2024
11c3e55
[auto commit] sp500_daily reconciliation & execution on 2024-07-22
enzbus Jul 22, 2024
cf5cb01
[auto commit] ftse100_daily reconciliation & execution on 2024-07-23
enzbus Jul 23, 2024
243b5be
[auto commit] dow30_daily reconciliation & execution on 2024-07-23
enzbus Jul 23, 2024
8a4700e
[auto commit] ndx100_daily reconciliation & execution on 2024-07-23
enzbus Jul 23, 2024
a873e7e
[auto commit] sp500_daily reconciliation & execution on 2024-07-23
enzbus Jul 23, 2024
87f9e14
[auto commit] ftse100_daily reconciliation & execution on 2024-07-24
enzbus Jul 24, 2024
22e2a62
[auto commit] dow30_daily reconciliation & execution on 2024-07-24
enzbus Jul 24, 2024
3d2060f
[auto commit] ndx100_daily reconciliation & execution on 2024-07-24
enzbus Jul 24, 2024
d572a99
[auto commit] sp500_daily reconciliation & execution on 2024-07-24
enzbus Jul 24, 2024
9ba5b14
[auto commit] ftse100_daily reconciliation & execution on 2024-07-25
enzbus Jul 25, 2024
7b7bd37
marked test that waits redesign, merging this in main
enzbus Jul 25, 2024
104ad5a
warnings thrown on old pandas
enzbus Jul 25, 2024
030237a
warnings thrown on old pandas
enzbus Jul 25, 2024
bfb3c0a
debugging for old pandas
enzbus Jul 25, 2024
78cd6ed
tests fail b/c coverage
enzbus Jul 25, 2024
204dcb3
[auto commit] dow30_daily reconciliation & execution on 2024-07-25
enzbus Jul 25, 2024
d389f80
[auto commit] ndx100_daily reconciliation & execution on 2024-07-25
enzbus Jul 25, 2024
42b5554
[auto commit] sp500_daily reconciliation & execution on 2024-07-25
enzbus Jul 25, 2024
0c2711e
working on rest of regression
enzbus Jul 25, 2024
a9e4220
[auto commit] ftse100_daily reconciliation & execution on 2024-07-26
enzbus Jul 26, 2024
ec88cce
gh tests should pass;
enzbus Jul 26, 2024
2b46fd2
Merge branch 'main' of github.com:cvxgrp/cvxportfolio
enzbus Jul 26, 2024
0ced952
[auto commit] dow30_daily reconciliation & execution on 2024-07-26
enzbus Jul 26, 2024
1638a48
[auto commit] ndx100_daily reconciliation & execution on 2024-07-26
enzbus Jul 26, 2024
eaaa52a
[auto commit] sp500_daily reconciliation & execution on 2024-07-26
enzbus Jul 26, 2024
d91a70d
[auto commit] ftse100_daily reconciliation & execution on 2024-07-29
enzbus Jul 29, 2024
57a0d66
[auto commit] dow30_daily reconciliation & execution on 2024-07-29
enzbus Jul 29, 2024
3696eb2
[auto commit] ndx100_daily reconciliation & execution on 2024-07-29
enzbus Jul 29, 2024
1669c07
[auto commit] sp500_daily reconciliation & execution on 2024-07-29
enzbus Jul 29, 2024
4ea01b6
[auto commit] ftse100_daily reconciliation & execution on 2024-07-30
enzbus Jul 30, 2024
f5ad34a
readme, removed old text
enzbus Jul 30, 2024
57eb9ae
[auto commit] dow30_daily reconciliation & execution on 2024-07-30
enzbus Jul 30, 2024
61812d8
[auto commit] ndx100_daily reconciliation & execution on 2024-07-30
enzbus Jul 30, 2024
5686f6b
[auto commit] sp500_daily reconciliation & execution on 2024-07-30
enzbus Jul 30, 2024
e9ac445
[auto commit] ftse100_daily reconciliation & execution on 2024-07-31
enzbus Jul 31, 2024
55e49d6
[auto commit] dow30_daily reconciliation & execution on 2024-07-31
enzbus Jul 31, 2024
03fe8be
[auto commit] ndx100_daily reconciliation & execution on 2024-07-31
enzbus Jul 31, 2024
4d42cd6
[auto commit] sp500_daily reconciliation & execution on 2024-07-31
enzbus Jul 31, 2024
092ccaf
[auto commit] ftse100_daily reconciliation & execution on 2024-08-01
enzbus Aug 1, 2024
97b0b60
[auto commit] dow30_daily reconciliation & execution on 2024-08-01
enzbus Aug 1, 2024
cdb0f05
[auto commit] ndx100_daily reconciliation & execution on 2024-08-01
enzbus Aug 1, 2024
1658061
[auto commit] sp500_daily reconciliation & execution on 2024-08-01
enzbus Aug 1, 2024
d3e3335
[auto commit] ftse100_daily reconciliation & execution on 2024-08-02
enzbus Aug 2, 2024
1c55cf6
[auto commit] dow30_daily reconciliation & execution on 2024-08-02
enzbus Aug 2, 2024
cd0b29d
[auto commit] ndx100_daily reconciliation & execution on 2024-08-02
enzbus Aug 2, 2024
5771c02
[auto commit] sp500_daily reconciliation & execution on 2024-08-02
enzbus Aug 2, 2024
c92b4e0
[auto commit] ftse100_daily reconciliation & execution on 2024-08-05
enzbus Aug 5, 2024
b40344b
[auto commit] dow30_daily reconciliation & execution on 2024-08-05
enzbus Aug 5, 2024
9bd8137
[auto commit] ndx100_daily reconciliation & execution on 2024-08-05
enzbus Aug 5, 2024
4c91c82
[auto commit] sp500_daily reconciliation & execution on 2024-08-05
enzbus Aug 5, 2024
4fb8de1
[auto commit] ftse100_daily reconciliation & execution on 2024-08-06
enzbus Aug 6, 2024
2d647b1
[auto commit] dow30_daily reconciliation & execution on 2024-08-06
enzbus Aug 6, 2024
8a94442
[auto commit] ndx100_daily reconciliation & execution on 2024-08-06
enzbus Aug 6, 2024
d762a0d
[auto commit] sp500_daily reconciliation & execution on 2024-08-06
enzbus Aug 6, 2024
131e665
[auto commit] ftse100_daily reconciliation & execution on 2024-08-07
enzbus Aug 7, 2024
c8f8fb2
[auto commit] dow30_daily reconciliation & execution on 2024-08-07
enzbus Aug 7, 2024
10a15c3
[auto commit] ndx100_daily reconciliation & execution on 2024-08-07
enzbus Aug 7, 2024
934c3a3
[auto commit] sp500_daily reconciliation & execution on 2024-08-07
enzbus Aug 7, 2024
605c35e
[auto commit] ftse100_daily reconciliation & execution on 2024-08-08
enzbus Aug 8, 2024
2b270dd
[auto commit] dow30_daily reconciliation & execution on 2024-08-08
enzbus Aug 8, 2024
5d8c713
[auto commit] ndx100_daily reconciliation & execution on 2024-08-08
enzbus Aug 8, 2024
3301553
[auto commit] sp500_daily reconciliation & execution on 2024-08-08
enzbus Aug 8, 2024
8f7a625
[auto commit] ftse100_daily reconciliation & execution on 2024-08-09
enzbus Aug 9, 2024
a6d5c41
[auto commit] dow30_daily reconciliation & execution on 2024-08-09
enzbus Aug 9, 2024
b0e2798
[auto commit] ndx100_daily reconciliation & execution on 2024-08-09
enzbus Aug 9, 2024
b8cd350
[auto commit] sp500_daily reconciliation & execution on 2024-08-09
enzbus Aug 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:

push:
branches:
- main
- master

pull_request:
branches:
- main
- master

jobs:

Expand Down
11 changes: 8 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
AUTHORS
Enzo Busseti and Steven Diamond developed the software library. Stephen Boyd directed the
project. BlackRock Inc. provided support via technical, financial, and (additional)
human resources.

2016: Enzo Busseti and Steven Diamond developed the software library. Stephen
Boyd directed the project. BlackRock Inc. provided support via technical,
financial, and (additional) human resources.

2017-today, Enzo Busseti has been maintaining and further developing the
software library, with the help of many independent contributors and of the
other original authors.
875 changes: 674 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

95 changes: 60 additions & 35 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
.. Copyright (C) 2023-2024 Enzo Busseti
.. Copyright (C) 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.

.. This file is part of Cvxportfolio.

.. Cvxportfolio is free software: you can redistribute it and/or modify it under
.. the terms of the GNU General Public License as published by the Free Software
.. Foundation, either version 3 of the License, or (at your option) any later
.. version.

.. Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
.. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
.. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
.. details.

.. You should have received a copy of the GNU General Public License along with
.. Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
`Cvxportfolio <https://www.cvxportfolio.com>`_
==============================================

|CVXportfolio on PyPI| |linting: pylint| |Coverage Status|
|Documentation Status| |Apache 2.0 License| |Anaconda-Server Badge|
|Documentation Status| |GPLv3| |Anaconda-Server Badge|


Cvxportfolio is an object-oriented library for portfolio optimization
and back-testing. It implements models described in the `accompanying paper
<https://cvxportfolio.readthedocs.io/en/master/_static/cvx_portfolio.pdf>`_.
`Cvxportfolio <https://cvxportfolio.readthedocs.io>`_ is an object-oriented
library for portfolio optimization and back-testing. It implements models
described in the `accompanying paper
<https://cvxportfolio.readthedocs.io/en/stable/_static/cvx_portfolio.pdf>`_.

The documentation of the library is at
`www.cvxportfolio.com <https://www.cvxportfolio.com>`_.
Expand All @@ -18,22 +36,26 @@ The documentation of the library is at

Since end of 2023 we're running daily `example strategies
<https://github.com/cvxgrp/cvxportfolio/tree/master/examples/strategies>`_
using the development version (master branch); each day we commit target
weights and initial holdings to the repository. All the code that runs them,
including the cron script, is in the repository.
using the `development (master) branch
<https://github.com/cvxgrp/cvxportfolio/tree/master/>`_.; each day we commit
target weights and initial holdings to the repository. All the code that
runs them, including the `cron script
<https://github.com/cvxgrp/cvxportfolio/blob/master/strategies_runner.sh>`_,
is in the repository.

Installation
------------

Cvxportolio is written in Python and can be easily installed in any Python
environment by simple:
Cvxportolio is written in `Python <https://docs.python.org/>`_ and can be
installed in any `Python environment
<https://docs.python.org/3/library/venv.html>`_ by simple:

.. code:: bash

pip install -U cvxportfolio

You can see how this works on our `Installation and Hello
World <https://youtu.be/1ThOKEu371M>`_ youtube video.
World <https://youtu.be/1ThOKEu371M>`_ Youtube video.
Anaconda installs
`are also supported <https://anaconda.org/conda-forge/cvxportfolio>`_.

Expand All @@ -42,6 +64,20 @@ interfacing with numerical solvers and `Pandas <https://pandas.pydata.org/>`_
for interfacing with databases. We don't require any specific version of our
dependencies and test against all recent ones (up to a few years ago).

Advanced: install development version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can also install the development version. It is tested daily by the
example strategies. We host it in the `master branch
<https://github.com/cvxgrp/cvxportfolio/tree/master/>`_. It is named after
the current stable version; each time we make a new release we `tag it with git
<https://github.com/cvxgrp/cvxportfolio/tags>`_.
If this sounds complicated, avoid installing the development
version.

.. code:: bash

pip install --upgrade --force-reinstall git+https://github.com/cvxgrp/cvxportfolio@master

.. Test

Expand Down Expand Up @@ -113,13 +149,6 @@ their output and comments.
<https://github.com/cvxgrp/cvxportfolio/blob/master/examples>`_
are available in the code repository.

`The original examples from the paper
<https://github.com/cvxgrp/cvxportfolio/tree/0.0.X/examples>`_
are visible in a dedicated branch,
and are being translated to run with the stable versions (``1.0.0`` and above) of the
library. The translations are visible at `this documentation page
<https://cvxportfolio.readthedocs.io/en/stable/examples/paper_examples.html>`_.

We show in the example on `user-provided
forecasters <https://cvxportfolio.readthedocs.io/en/stable/examples/user_provided_forecasters.html>`_
how the user can define custom classes to forecast the expected returns
Expand All @@ -140,7 +169,7 @@ the best strategy to apply to any given selection of assets.
Similar projects
----------------

There are many open-source projects for portfolio optimization and back-testing.
There are many software projects for portfolio optimization and back-testing.
Some notable ones in the Python ecosystem are `Zipline <https://github.com/quantopian/zipline>`_,
which implements a call-back model for back-testing very similar to the one
we provide, `Riskfolio-Lib <https://riskfolio-lib.readthedocs.io/en/latest/examples.html>`_
Expand All @@ -160,18 +189,11 @@ devoted to portfolio optimization (indeed, Cvxportfolio was born out of those).
Contributions
-------------

We welcome contributors and you don't need to sign a CLA. If you don't have
a Github account you may also send a
`git patch via email <https://git-scm.com/docs/git-send-email>`_ to the
`project maintainer <https://github.com/enzbus>`_.
We welcome contributions and you don't need to sign a CLA.

Bug fixes, improvements in the documentations and examples,
new constraints, new cost objects, ..., are good contributions and can be done
even if you're not familiar with the low-level details on the library.
For more advanced contributions we recommend reading the
`TODOs and roadmap
<https://github.com/cvxgrp/cvxportfolio/blob/master/TODOs_ROADMAP.rst>`_
file.

Development
-----------
Expand All @@ -186,6 +208,11 @@ and then clone your fork)
git clone https://github.com/cvxgrp/cvxportfolio.git
cd cvxportfolio

.. We develop in the ``main`` branch. So you should `check out
.. <https://git-scm.com/docs/git-checkout>`_ that one. The default branch shown on
.. the homepage of the repository is the ``master`` branch. It hosts the last
.. release.

Then, you should have a look at our
`Makefile <https://www.gnu.org/software/make/manual/make.html#Introduction>`_
and possibly change the ``PYTHON`` variable to match your system's
Expand Down Expand Up @@ -258,9 +285,6 @@ Releases are also tagged in our git repository and include a short summary
of changes in
`their commit messages <https://github.com/cvxgrp/cvxportfolio/tags>`_.

We maintain a `document listing the planned changes and target releases
<https://github.com/cvxgrp/cvxportfolio/blob/master/TODOs_ROADMAP.rst>`_.


.. Citing

Expand Down Expand Up @@ -308,11 +332,12 @@ The latter is also the first chapter of this PhD thesis:
}


Licensing
---------
Legal
-----

Cvxportfolio is licensed under the `Apache 2.0 <https://www.apache.org/licenses/LICENSE-2.0>`_ permissive
open source license.
Cvxportfolio is `free software <https://www.gnu.org/philosophy/free-sw.html>`_.
It is released under the terms of the `General Public License, version 3
<https://www.gnu.org/licenses/gpl-3.0.html>`_.

.. |CVXportfolio on PyPI| image:: https://img.shields.io/pypi/v/cvxportfolio.svg
:target: https://pypi.org/project/cvxportfolio/
Expand All @@ -322,7 +347,7 @@ open source license.
:target: https://coveralls.io/github/cvxgrp/cvxportfolio?branch=master
.. |Documentation Status| image:: https://readthedocs.org/projects/cvxportfolio/badge/?version=stable
:target: https://cvxportfolio.readthedocs.io/en/stable/?badge=stable
.. |Apache 2.0 License| image:: https://img.shields.io/badge/License-Apache%202.0-green.svg
:target: https://github.com/cvxgrp/cvxportfolio/blob/master/LICENSE
.. |GPLv3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg
:target: https://www.gnu.org/licenses/gpl-3.0
.. |Anaconda-Server Badge| image:: https://anaconda.org/conda-forge/cvxportfolio/badges/version.svg
:target: https://anaconda.org/conda-forge/cvxportfolio
23 changes: 13 additions & 10 deletions bumpversion.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Copyright 2023 Enzo Busseti
# Copyright (C) 2023-2024 Enzo Busseti
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This file is part of Cvxportfolio.
#
# http://www.apache.org/licenses/LICENSE-2.0
# Cvxportfolio is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
"""Find __version__ in __init__.py in file tree (BFS) and upgrade.

Additionally, look for version string in any setup.py, pyproject.toml,
Expand Down
41 changes: 31 additions & 10 deletions cvxportfolio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
# Copyright 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.
# Copyright (C) 2017-2024 Enzo Busseti
# Copyright (C) 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This file is part of Cvxportfolio.
#
# http://www.apache.org/licenses/LICENSE-2.0
# Cvxportfolio is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
#
## Earlier versions of this module had the following copyright and licensing
## notice, which is subsumed by the above.
##
### Copyright 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.
###
### Licensed under the Apache License, Version 2.0 (the "License");
### you may not use this file except in compliance with the License.
### You may obtain a copy of the License at
###
### http://www.apache.org/licenses/LICENSE-2.0
###
### Unless required by applicable law or agreed to in writing, software
### distributed under the License is distributed on an "AS IS" BASIS,
### WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
### See the License for the specific language governing permissions and
### limitations under the License.
"""Cvxportfolio __init__ module.

This module only republishes the api of a selection of cvxportfolio
Expand Down
23 changes: 13 additions & 10 deletions cvxportfolio/cache.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Copyright 2023 Enzo Busseti
# Copyright (C) 2023-2024 Enzo Busseti
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This file is part of Cvxportfolio.
#
# http://www.apache.org/licenses/LICENSE-2.0
# Cvxportfolio is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
"""Caching functions used by :class:`MarketSimulator`."""

import logging
Expand Down
41 changes: 31 additions & 10 deletions cvxportfolio/constraints/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
# Copyright 2023 Enzo Busseti
# Copyright (C) 2017-2024 Enzo Busseti
# Copyright (C) 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This file is part of Cvxportfolio.
#
# http://www.apache.org/licenses/LICENSE-2.0
# Cvxportfolio is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
#
## Earlier versions of this module had the following copyright and licensing
## notice, which is subsumed by the above.
##
### Copyright 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc.
###
### Licensed under the Apache License, Version 2.0 (the "License");
### you may not use this file except in compliance with the License.
### You may obtain a copy of the License at
###
### http://www.apache.org/licenses/LICENSE-2.0
###
### Unless required by applicable law or agreed to in writing, software
### distributed under the License is distributed on an "AS IS" BASIS,
### WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
### See the License for the specific language governing permissions and
### limitations under the License.
"""Here we define many realistic constraints that apply to :ref:`portfolio
optimization trading policies <optimization-policies-page>`.

Expand Down
23 changes: 13 additions & 10 deletions cvxportfolio/constraints/base_constraints.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Copyright 2023 Enzo Busseti
# Copyright (C) 2023-2024 Enzo Busseti
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# This file is part of Cvxportfolio.
#
# http://www.apache.org/licenses/LICENSE-2.0
# Cvxportfolio is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Cvxportfolio is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Cvxportfolio. If not, see <https://www.gnu.org/licenses/>.
"""This module defines base constraint classes."""


Expand Down
Loading