From 418eab1905ebcd92ff270ece98c30401249752b2 Mon Sep 17 00:00:00 2001 From: Enzo Busseti Date: Sat, 13 Jul 2024 15:54:52 +0400 Subject: [PATCH] should have finished fixing files header comments for #166 --- AUTHORS | 5 ++-- README.rst | 6 ++--- bumpversion.py | 23 +++++++++++-------- cvxportfolio/__init__.py | 22 ++++++++++-------- cvxportfolio/cache.py | 23 +++++++++++-------- cvxportfolio/costs.py | 22 ++++++++++-------- cvxportfolio/errors.py | 23 +++++++++++-------- cvxportfolio/estimator.py | 23 +++++++++++-------- cvxportfolio/forecast.py | 23 +++++++++++-------- cvxportfolio/hyperparameters.py | 23 +++++++++++-------- cvxportfolio/policies.py | 22 ++++++++++-------- cvxportfolio/result.py | 22 ++++++++++-------- cvxportfolio/returns.py | 22 ++++++++++-------- cvxportfolio/risks.py | 22 ++++++++++-------- cvxportfolio/simulator.py | 22 ++++++++++-------- cvxportfolio/utils.py | 23 +++++++++++-------- docs/conf.py | 2 +- examples/__init__.py | 23 +++++++++++-------- examples/case_shiller.py | 23 +++++++++++-------- examples/data_cleaning.py | 23 +++++++++++-------- examples/dow30.py | 23 +++++++++++-------- examples/etfs.py | 23 +++++++++++-------- examples/hello_world.py | 23 +++++++++++-------- examples/market_neutral.py | 23 +++++++++++-------- examples/market_neutral_nocosts.py | 21 +++++++++-------- examples/multiperiod_tcost.py | 23 +++++++++++-------- examples/paper_examples/__init__.py | 22 ++++++++++-------- examples/paper_examples/common.py | 22 ++++++++++-------- examples/paper_examples/data_risk_model.py | 22 ++++++++++-------- examples/paper_examples/hello_world.py | 22 ++++++++++-------- examples/paper_examples/multi_period_opt.py | 22 ++++++++++-------- .../paper_examples/portfolio_simulation.py | 22 ++++++++++-------- examples/paper_examples/rank_and_spo.py | 22 ++++++++++-------- .../paper_examples/real_time_optimization.py | 22 ++++++++++-------- examples/paper_examples/single_period_opt.py | 22 ++++++++++-------- .../single_period_opt_lin_tcost.py | 22 ++++++++++-------- examples/paper_examples/solution_time.py | 22 ++++++++++-------- examples/regression_covariance.py | 23 +++++++++++-------- examples/risk_models.py | 23 +++++++++++-------- examples/sp500_ndx100.py | 23 +++++++++++-------- examples/strategies/__init__.py | 23 +++++++++++-------- examples/strategies/dow30_daily.py | 23 +++++++++++-------- examples/strategies/ftse100_daily.py | 23 +++++++++++-------- examples/strategies/ndx100_daily.py | 23 +++++++++++-------- examples/strategies/sp500_daily.py | 23 +++++++++++-------- examples/strategies/sp500_targetvol_daily.py | 23 +++++++++++-------- examples/strategies/strategy_executor.py | 23 +++++++++++-------- examples/timing.py | 23 +++++++++++-------- examples/universes.py | 23 +++++++++++-------- ...rage_margin_portfolio_bid_ask_modelling.py | 21 +++++++++-------- examples/user_provided_forecasters.py | 23 +++++++++++-------- 51 files changed, 629 insertions(+), 466 deletions(-) diff --git a/AUTHORS b/AUTHORS index 46ccd5059..807cb1cb5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,5 +4,6 @@ AUTHORS Boyd directed the project. BlackRock Inc. provided support via technical, financial, and (additional) human resources. -2017-2024, Enzo Busseti has been maintaining and further developing the -software library. +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. diff --git a/README.rst b/README.rst index fe1f3523c..a57389777 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ ============================================== |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 @@ -322,7 +322,7 @@ free software 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 diff --git a/bumpversion.py b/bumpversion.py index 56317ff4f..3fa45b585 100644 --- a/bumpversion.py +++ b/bumpversion.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Find __version__ in __init__.py in file tree (BFS) and upgrade. Additionally, look for version string in any setup.py, pyproject.toml, diff --git a/cvxportfolio/__init__.py b/cvxportfolio/__init__.py index b4e6db34b..3879ee313 100644 --- a/cvxportfolio/__init__.py +++ b/cvxportfolio/__init__.py @@ -1,16 +1,20 @@ +# Copyright 2017-2024 Enzo Busseti # 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 +# 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 . """Cvxportfolio __init__ module. This module only republishes the api of a selection of cvxportfolio diff --git a/cvxportfolio/cache.py b/cvxportfolio/cache.py index 61cdc3d8b..bac1d2fd9 100644 --- a/cvxportfolio/cache.py +++ b/cvxportfolio/cache.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Caching functions used by :class:`MarketSimulator`.""" import logging diff --git a/cvxportfolio/costs.py b/cvxportfolio/costs.py index 9ec1fe397..40fa1863c 100644 --- a/cvxportfolio/costs.py +++ b/cvxportfolio/costs.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module defines cost models for both simulation and optimization. We implement two types of costs, as discussed in the paper: diff --git a/cvxportfolio/errors.py b/cvxportfolio/errors.py index 4eeb52d89..3d447e87b 100644 --- a/cvxportfolio/errors.py +++ b/cvxportfolio/errors.py @@ -1,16 +1,19 @@ -# Copyright 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc. +# Copyright 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 . """This module defines some Exceptions thrown by Cvxportfolio objects.""" __all__ = ['DataError', 'UserDataError', 'MissingTimesError', diff --git a/cvxportfolio/estimator.py b/cvxportfolio/estimator.py index 0c02c73eb..cb325aa0a 100644 --- a/cvxportfolio/estimator.py +++ b/cvxportfolio/estimator.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This module implements Estimator base classes. Policies, costs, and constraints inherit from this. diff --git a/cvxportfolio/forecast.py b/cvxportfolio/forecast.py index 978cdc9c1..6a061ac2a 100644 --- a/cvxportfolio/forecast.py +++ b/cvxportfolio/forecast.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . r"""This module implements the simple forecasting models used by Cvxportfolio. These are standard ones like historical mean, variance, and covariance. In diff --git a/cvxportfolio/hyperparameters.py b/cvxportfolio/hyperparameters.py index bcc9fa5e3..3c9dc3e17 100644 --- a/cvxportfolio/hyperparameters.py +++ b/cvxportfolio/hyperparameters.py @@ -1,16 +1,19 @@ -# Copyright 2016 Enzo Busseti, Stephen Boyd, Steven Diamond, BlackRock Inc. +# Copyright 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 . """This module defines hyperparameter objects. These are used currently as symbolic multipliers of cost terms in Single diff --git a/cvxportfolio/policies.py b/cvxportfolio/policies.py index c6bc942b3..244a0e2a4 100644 --- a/cvxportfolio/policies.py +++ b/cvxportfolio/policies.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module contains trading policies that can be back-tested.""" import copy diff --git a/cvxportfolio/result.py b/cvxportfolio/result.py index d6639ba22..46c5ea5ea 100644 --- a/cvxportfolio/result.py +++ b/cvxportfolio/result.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module defines :class:`BacktestResult`. This is the object that is returned by the diff --git a/cvxportfolio/returns.py b/cvxportfolio/returns.py index 9b362d445..dedd494f1 100644 --- a/cvxportfolio/returns.py +++ b/cvxportfolio/returns.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module contains classes that define return models for portfolio optimization policies and related objects.""" diff --git a/cvxportfolio/risks.py b/cvxportfolio/risks.py index 52f9c1f95..5151b1897 100644 --- a/cvxportfolio/risks.py +++ b/cvxportfolio/risks.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module implements risk models, which are objective terms that are used to penalize allocations which might incur in losses.""" diff --git a/cvxportfolio/simulator.py b/cvxportfolio/simulator.py index bec9fded1..ac53efd37 100644 --- a/cvxportfolio/simulator.py +++ b/cvxportfolio/simulator.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module implements :class:`cvxportfolio.MarketSimulator` and derived classes. diff --git a/cvxportfolio/utils.py b/cvxportfolio/utils.py index c2eab76d4..74802f721 100644 --- a/cvxportfolio/utils.py +++ b/cvxportfolio/utils.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This module contains miscellaneous functions.""" import hashlib diff --git a/docs/conf.py b/docs/conf.py index 64dce680c..33e2bc575 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -122,7 +122,7 @@ "github_url": "https://github.com", "github_user": "cvxgrp", "github_repo": "cvxportfolio", - "github_version": "master", # don't know if can point to tag of the page? + "github_version": "main", # don't know if can point to tag of the page? "doc_path": "docs", } diff --git a/examples/__init__.py b/examples/__init__.py index 127402b87..30dd34e10 100644 --- a/examples/__init__.py +++ b/examples/__init__.py @@ -1,14 +1,17 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This package contains examples of typical usage of Cvxportfolio.""" diff --git a/examples/case_shiller.py b/examples/case_shiller.py index 71f7c3e50..9fac843f2 100644 --- a/examples/case_shiller.py +++ b/examples/case_shiller.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """We test the Multi-Period Optimization model on a real estate portfolio. This is an example that shows that Cvxportfolio can work as well with diff --git a/examples/data_cleaning.py b/examples/data_cleaning.py index 90a2ff97c..eec73501c 100644 --- a/examples/data_cleaning.py +++ b/examples/data_cleaning.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This script is used to show the data cleaning applied to Yahoo Finance data. The procedure has many steps, with a lot of heuristics. You can see it diff --git a/examples/dow30.py b/examples/dow30.py index 1f5953dd7..c2a358503 100644 --- a/examples/dow30.py +++ b/examples/dow30.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Example of long-only portfolio among DOW-30 components. Monthly rebalance, backtest spans from the start of data of the diff --git a/examples/etfs.py b/examples/etfs.py index 22f0f1972..9a3dc3e13 100644 --- a/examples/etfs.py +++ b/examples/etfs.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """ETFs example covering the main asset classes. This uses an explicit loop to create Multi Period Optimization diff --git a/examples/hello_world.py b/examples/hello_world.py index 4e15872d7..74e271548 100644 --- a/examples/hello_world.py +++ b/examples/hello_world.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example of Cvxportfolio's capabilities. A multi-period optimization policy, with default forecasts and simple diff --git a/examples/market_neutral.py b/examples/market_neutral.py index 461962c96..ef912c357 100644 --- a/examples/market_neutral.py +++ b/examples/market_neutral.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Market (and dollar) neutral strategy on the NDX100 universe. We use standard historical means and factor covariances to build a simple diff --git a/examples/market_neutral_nocosts.py b/examples/market_neutral_nocosts.py index c88e2d6e1..61fcb2089 100644 --- a/examples/market_neutral_nocosts.py +++ b/examples/market_neutral_nocosts.py @@ -1,16 +1,19 @@ # Copyright 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 . """This is a simple example of a market (and dollar) neutral strategy. We use a target volatility risk penalty, which is an alternative to the diff --git a/examples/multiperiod_tcost.py b/examples/multiperiod_tcost.py index bbb6c14df..9b5634ad0 100644 --- a/examples/multiperiod_tcost.py +++ b/examples/multiperiod_tcost.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . import pandas as pd diff --git a/examples/paper_examples/__init__.py b/examples/paper_examples/__init__.py index 6d864d0ae..395abdb97 100644 --- a/examples/paper_examples/__init__.py +++ b/examples/paper_examples/__init__.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This package contains the restored versions of the original code examples developed for the 2017 paper. You can find the originals at: diff --git a/examples/paper_examples/common.py b/examples/paper_examples/common.py index 0e41f5b50..52c5bdf86 100644 --- a/examples/paper_examples/common.py +++ b/examples/paper_examples/common.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This module defines some common operations used by the examples.""" from pathlib import Path diff --git a/examples/paper_examples/data_risk_model.py b/examples/paper_examples/data_risk_model.py index cea25ad7f..286e1b2bc 100644 --- a/examples/paper_examples/data_risk_model.py +++ b/examples/paper_examples/data_risk_model.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This is the restored version of the IPython notebook used to download data for the original 2016 examples: diff --git a/examples/paper_examples/hello_world.py b/examples/paper_examples/hello_world.py index 3e5cd8964..515d27de0 100644 --- a/examples/paper_examples/hello_world.py +++ b/examples/paper_examples/hello_world.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """This is a simple example of back-tests with Cvxportfolio. This is a close translation of what was done in `this notebook diff --git a/examples/paper_examples/multi_period_opt.py b/examples/paper_examples/multi_period_opt.py index 55cbc966f..1b263fe5b 100644 --- a/examples/paper_examples/multi_period_opt.py +++ b/examples/paper_examples/multi_period_opt.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/paper_examples/portfolio_simulation.py b/examples/paper_examples/portfolio_simulation.py index 1419a35a7..763a601ed 100644 --- a/examples/paper_examples/portfolio_simulation.py +++ b/examples/paper_examples/portfolio_simulation.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """Simulate periodic rebalancing policy, analyze transaction cost. This is a close translation of what was done in `this notebook diff --git a/examples/paper_examples/rank_and_spo.py b/examples/paper_examples/rank_and_spo.py index 6bfd57513..391f08783 100644 --- a/examples/paper_examples/rank_and_spo.py +++ b/examples/paper_examples/rank_and_spo.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """Ranking vs. SPO example. *Work in progress.* diff --git a/examples/paper_examples/real_time_optimization.py b/examples/paper_examples/real_time_optimization.py index 55cbc966f..1b263fe5b 100644 --- a/examples/paper_examples/real_time_optimization.py +++ b/examples/paper_examples/real_time_optimization.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/paper_examples/single_period_opt.py b/examples/paper_examples/single_period_opt.py index 11b87576e..32500050e 100644 --- a/examples/paper_examples/single_period_opt.py +++ b/examples/paper_examples/single_period_opt.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """*Work in progress.*""" import matplotlib.pyplot as plt diff --git a/examples/paper_examples/single_period_opt_lin_tcost.py b/examples/paper_examples/single_period_opt_lin_tcost.py index 55cbc966f..1b263fe5b 100644 --- a/examples/paper_examples/single_period_opt_lin_tcost.py +++ b/examples/paper_examples/single_period_opt_lin_tcost.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/paper_examples/solution_time.py b/examples/paper_examples/solution_time.py index 55cbc966f..1b263fe5b 100644 --- a/examples/paper_examples/solution_time.py +++ b/examples/paper_examples/solution_time.py @@ -1,16 +1,20 @@ +# Copyright 2023-2024 Enzo Busseti # 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 +# 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 . """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/regression_covariance.py b/examples/regression_covariance.py index dc5328123..e353bc614 100644 --- a/examples/regression_covariance.py +++ b/examples/regression_covariance.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Build covariance matrix by regression. This is a prototype for a planned extension of the forecast module in the main diff --git a/examples/risk_models.py b/examples/risk_models.py index 12e920f7b..4c45fb2ae 100644 --- a/examples/risk_models.py +++ b/examples/risk_models.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Test different choices of risk models, which has best performance? .. note:: diff --git a/examples/sp500_ndx100.py b/examples/sp500_ndx100.py index 1ad08e7e7..804d0f119 100644 --- a/examples/sp500_ndx100.py +++ b/examples/sp500_ndx100.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is an example of a very large backtest. It has about ~600 names and ~6000 days, and uses multi period optimization. diff --git a/examples/strategies/__init__.py b/examples/strategies/__init__.py index 992c2c9bc..7ff80668b 100644 --- a/examples/strategies/__init__.py +++ b/examples/strategies/__init__.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This module contains examples of simple strategies built with Cvxportfolio. These are executed every day (or less often, depending on the strategy) at diff --git a/examples/strategies/dow30_daily.py b/examples/strategies/dow30_daily.py index 23f680847..33f6dc0fa 100644 --- a/examples/strategies/dow30_daily.py +++ b/examples/strategies/dow30_daily.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example strategy which we run every day. It is a long-only, unit leverage, allocation on the Dow Jones universe. We diff --git a/examples/strategies/ftse100_daily.py b/examples/strategies/ftse100_daily.py index 5c0a6bc7b..6c2d508d7 100644 --- a/examples/strategies/ftse100_daily.py +++ b/examples/strategies/ftse100_daily.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example strategy which we run every day. It is a long-only, unit leverage, allocation on the FTSE 100 universe. diff --git a/examples/strategies/ndx100_daily.py b/examples/strategies/ndx100_daily.py index 9cc384a90..ce082a92f 100644 --- a/examples/strategies/ndx100_daily.py +++ b/examples/strategies/ndx100_daily.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example strategy which we run every day. It is a variant of the ``dow30_daily`` strategy with the Nasdaq 100 universe. diff --git a/examples/strategies/sp500_daily.py b/examples/strategies/sp500_daily.py index fede4ecf0..b895313e9 100644 --- a/examples/strategies/sp500_daily.py +++ b/examples/strategies/sp500_daily.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example strategy which we run every day. It is a long-only, unit leverage, allocation on the Standard and Poor's 500 diff --git a/examples/strategies/sp500_targetvol_daily.py b/examples/strategies/sp500_targetvol_daily.py index 71f4b6a8b..9609ff7f9 100644 --- a/examples/strategies/sp500_targetvol_daily.py +++ b/examples/strategies/sp500_targetvol_daily.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This is a simple example strategy which we run every day.""" import cvxportfolio as cvx diff --git a/examples/strategies/strategy_executor.py b/examples/strategies/strategy_executor.py index 9cb1654c0..f975478b2 100644 --- a/examples/strategies/strategy_executor.py +++ b/examples/strategies/strategy_executor.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This module contains code used to run each individual strategy. Each strategy defines only one function, which defines its chosen trading diff --git a/examples/timing.py b/examples/timing.py index 07ac1f57e..d2f60229c 100644 --- a/examples/timing.py +++ b/examples/timing.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """We show the runtime of a typical single-period optimization back-test. This is similar to what was show in :paper:`figure 7.8 of the paper diff --git a/examples/universes.py b/examples/universes.py index 00af7b83a..9e1fce5cb 100644 --- a/examples/universes.py +++ b/examples/universes.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """This module contains up-to-date universes of stock tickers. If you run it attempts to download updated lists from the relevant diff --git a/examples/user_contributed/leverage_margin_portfolio_bid_ask_modelling.py b/examples/user_contributed/leverage_margin_portfolio_bid_ask_modelling.py index f31d9f72b..08b5b7177 100644 --- a/examples/user_contributed/leverage_margin_portfolio_bid_ask_modelling.py +++ b/examples/user_contributed/leverage_margin_portfolio_bid_ask_modelling.py @@ -1,16 +1,19 @@ # Copyright 2024 The Cvxportfolio Contributors # -# 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 . """This is a user-contributed example, and it's not finished. *Work in progress.* diff --git a/examples/user_provided_forecasters.py b/examples/user_provided_forecasters.py index 153bb5fd7..49c68d6e8 100644 --- a/examples/user_provided_forecasters.py +++ b/examples/user_provided_forecasters.py @@ -1,16 +1,19 @@ -# Copyright 2023 Enzo Busseti +# Copyright 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 . """Simple example for providing user-defined forecasters to Cvxportfolio. This example shows how the user can provide custom-made predictors for expected