From f8e60f3c05ae08e4c2d7bd0ab2e0122ab5733734 Mon Sep 17 00:00:00 2001 From: Enzo Busseti Date: Tue, 16 Jul 2024 23:26:41 +0400 Subject: [PATCH] another addition of lots of text in the comment headers, related to #166; following instructions from https://softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html which is linked on the apache2.0 page about gplv3 relicensing --- cvxportfolio/__init__.py | 34 +++++++++++++++++++ cvxportfolio/constraints/__init__.py | 17 ++++++++++ cvxportfolio/constraints/constraints.py | 17 ++++++++++ cvxportfolio/costs.py | 17 ++++++++++ cvxportfolio/policies.py | 17 ++++++++++ cvxportfolio/result.py | 17 ++++++++++ cvxportfolio/returns.py | 17 ++++++++++ cvxportfolio/risks.py | 17 ++++++++++ cvxportfolio/simulator.py | 17 ++++++++++ cvxportfolio/tests/__init__.py | 17 ++++++++++ cvxportfolio/tests/__main__.py | 17 ++++++++++ cvxportfolio/tests/test_constraints.py | 17 ++++++++++ cvxportfolio/tests/test_costs.py | 17 ++++++++++ cvxportfolio/tests/test_policies.py | 17 ++++++++++ cvxportfolio/tests/test_result.py | 17 ++++++++++ cvxportfolio/tests/test_returns.py | 17 ++++++++++ cvxportfolio/tests/test_risks.py | 17 ++++++++++ cvxportfolio/tests/test_simulator.py | 17 ++++++++++ .../paper_examples/data_risk_model.rst | 2 +- docs/examples/paper_examples/hello_world.rst | 2 +- .../paper_examples/multi_period_opt.rst | 2 +- .../paper_examples/portfolio_simulation.rst | 2 +- docs/examples/paper_examples/rank_and_spo.rst | 2 +- .../paper_examples/real_time_optimization.rst | 2 +- .../paper_examples/single_period_opt.rst | 2 +- .../single_period_opt_lin_tcost.rst | 2 +- .../examples/paper_examples/solution_time.rst | 2 +- docs/examples/risk_models.rst | 2 +- examples/paper_examples/__init__.py | 17 ++++++++++ examples/paper_examples/common.py | 17 ++++++++++ examples/paper_examples/data_risk_model.py | 17 ++++++++++ examples/paper_examples/hello_world.py | 17 ++++++++++ examples/paper_examples/multi_period_opt.py | 17 ++++++++++ .../paper_examples/portfolio_simulation.py | 17 ++++++++++ examples/paper_examples/rank_and_spo.py | 17 ++++++++++ .../paper_examples/real_time_optimization.py | 17 ++++++++++ examples/paper_examples/single_period_opt.py | 17 ++++++++++ .../single_period_opt_lin_tcost.py | 17 ++++++++++ examples/paper_examples/solution_time.py | 17 ++++++++++ 39 files changed, 520 insertions(+), 10 deletions(-) diff --git a/cvxportfolio/__init__.py b/cvxportfolio/__init__.py index 46e8302f4..6856c3808 100644 --- a/cvxportfolio/__init__.py +++ b/cvxportfolio/__init__.py @@ -15,6 +15,40 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. +# +## 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 diff --git a/cvxportfolio/constraints/__init__.py b/cvxportfolio/constraints/__init__.py index ce5d79111..abfbde70b 100644 --- a/cvxportfolio/constraints/__init__.py +++ b/cvxportfolio/constraints/__init__.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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 `. diff --git a/cvxportfolio/constraints/constraints.py b/cvxportfolio/constraints/constraints.py index a6addf7d4..1c5a356a1 100644 --- a/cvxportfolio/constraints/constraints.py +++ b/cvxportfolio/constraints/constraints.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """This module defines user-facing constraints.""" import cvxpy as cp diff --git a/cvxportfolio/costs.py b/cvxportfolio/costs.py index b0925cfc4..f60ad6e4a 100644 --- a/cvxportfolio/costs.py +++ b/cvxportfolio/costs.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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/policies.py b/cvxportfolio/policies.py index bae1b26a9..718fbbbeb 100644 --- a/cvxportfolio/policies.py +++ b/cvxportfolio/policies.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """This module contains trading policies that can be back-tested.""" import copy diff --git a/cvxportfolio/result.py b/cvxportfolio/result.py index cf01d60e7..02fd1407b 100644 --- a/cvxportfolio/result.py +++ b/cvxportfolio/result.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 293bcbf59..abcc0c2d4 100644 --- a/cvxportfolio/returns.py +++ b/cvxportfolio/returns.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 8d72643b1..ef8f76c15 100644 --- a/cvxportfolio/risks.py +++ b/cvxportfolio/risks.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 dbcdc032f..e0e036b73 100644 --- a/cvxportfolio/simulator.py +++ b/cvxportfolio/simulator.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """This module implements :class:`cvxportfolio.MarketSimulator` and derived classes. diff --git a/cvxportfolio/tests/__init__.py b/cvxportfolio/tests/__init__.py index bc834e9b0..72b9be98d 100644 --- a/cvxportfolio/tests/__init__.py +++ b/cvxportfolio/tests/__init__.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """We make the tests a sub-package so we can ship them.""" diff --git a/cvxportfolio/tests/__main__.py b/cvxportfolio/tests/__main__.py index a117810e2..058a5d2a9 100644 --- a/cvxportfolio/tests/__main__.py +++ b/cvxportfolio/tests/__main__.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Run all tests with ``python -m cvxportfolio.tests``.""" import unittest diff --git a/cvxportfolio/tests/test_constraints.py b/cvxportfolio/tests/test_constraints.py index 38402941c..b48b43a7a 100644 --- a/cvxportfolio/tests/test_constraints.py +++ b/cvxportfolio/tests/test_constraints.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the constraints objects.""" import unittest diff --git a/cvxportfolio/tests/test_costs.py b/cvxportfolio/tests/test_costs.py index 00baa4c31..0d9d0b985 100644 --- a/cvxportfolio/tests/test_costs.py +++ b/cvxportfolio/tests/test_costs.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the cost objects.""" import unittest diff --git a/cvxportfolio/tests/test_policies.py b/cvxportfolio/tests/test_policies.py index 753bfd0dd..ef9a11aa1 100644 --- a/cvxportfolio/tests/test_policies.py +++ b/cvxportfolio/tests/test_policies.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the policy objects.""" import unittest diff --git a/cvxportfolio/tests/test_result.py b/cvxportfolio/tests/test_result.py index ba73d31da..44226b6f8 100644 --- a/cvxportfolio/tests/test_result.py +++ b/cvxportfolio/tests/test_result.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the BacktestResult class and methods.""" import logging diff --git a/cvxportfolio/tests/test_returns.py b/cvxportfolio/tests/test_returns.py index 7b51bcd43..b8de41b34 100644 --- a/cvxportfolio/tests/test_returns.py +++ b/cvxportfolio/tests/test_returns.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the return forecast objects.""" import unittest diff --git a/cvxportfolio/tests/test_risks.py b/cvxportfolio/tests/test_risks.py index eab629422..fb4c474e6 100644 --- a/cvxportfolio/tests/test_risks.py +++ b/cvxportfolio/tests/test_risks.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the risk objects.""" import unittest diff --git a/cvxportfolio/tests/test_simulator.py b/cvxportfolio/tests/test_simulator.py index 42fca2a25..065bdeb19 100644 --- a/cvxportfolio/tests/test_simulator.py +++ b/cvxportfolio/tests/test_simulator.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """Unit tests for the market simulator and its backtest methods.""" # pylint: disable=too-many-lines diff --git a/docs/examples/paper_examples/data_risk_model.rst b/docs/examples/paper_examples/data_risk_model.rst index 15dde6482..0a000bcb7 100644 --- a/docs/examples/paper_examples/data_risk_model.rst +++ b/docs/examples/paper_examples/data_risk_model.rst @@ -30,4 +30,4 @@ which doesn't run any more for reasons explained below. .. literalinclude:: ../../../examples/paper_examples/data_risk_model.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/hello_world.rst b/docs/examples/paper_examples/hello_world.rst index 7c0fc8454..5b7a1303a 100644 --- a/docs/examples/paper_examples/hello_world.rst +++ b/docs/examples/paper_examples/hello_world.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/hello_world.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/multi_period_opt.rst b/docs/examples/paper_examples/multi_period_opt.rst index 28df670d2..aa135554a 100644 --- a/docs/examples/paper_examples/multi_period_opt.rst +++ b/docs/examples/paper_examples/multi_period_opt.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/multi_period_opt.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/portfolio_simulation.rst b/docs/examples/paper_examples/portfolio_simulation.rst index ef8a91c92..4fe5f94e1 100644 --- a/docs/examples/paper_examples/portfolio_simulation.rst +++ b/docs/examples/paper_examples/portfolio_simulation.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/portfolio_simulation.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/rank_and_spo.rst b/docs/examples/paper_examples/rank_and_spo.rst index 3df83be1e..a6dba1bec 100644 --- a/docs/examples/paper_examples/rank_and_spo.rst +++ b/docs/examples/paper_examples/rank_and_spo.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/rank_and_spo.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/real_time_optimization.rst b/docs/examples/paper_examples/real_time_optimization.rst index 39b0fcbc2..3f1c26777 100644 --- a/docs/examples/paper_examples/real_time_optimization.rst +++ b/docs/examples/paper_examples/real_time_optimization.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/real_time_optimization.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/single_period_opt.rst b/docs/examples/paper_examples/single_period_opt.rst index 214c9f029..166471141 100644 --- a/docs/examples/paper_examples/single_period_opt.rst +++ b/docs/examples/paper_examples/single_period_opt.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/single_period_opt.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/single_period_opt_lin_tcost.rst b/docs/examples/paper_examples/single_period_opt_lin_tcost.rst index c9693a82f..06302bf74 100644 --- a/docs/examples/paper_examples/single_period_opt_lin_tcost.rst +++ b/docs/examples/paper_examples/single_period_opt_lin_tcost.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/single_period_opt_lin_tcost.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/paper_examples/solution_time.rst b/docs/examples/paper_examples/solution_time.rst index e4d35423e..b6baa008b 100644 --- a/docs/examples/paper_examples/solution_time.rst +++ b/docs/examples/paper_examples/solution_time.rst @@ -30,4 +30,4 @@ using Cvxportfolio's stable API. .. literalinclude:: ../../../examples/paper_examples/solution_time.py :language: python - :lines: 16- \ No newline at end of file + :lines: 35- \ No newline at end of file diff --git a/docs/examples/risk_models.rst b/docs/examples/risk_models.rst index a48e78d6e..e2775360f 100644 --- a/docs/examples/risk_models.rst +++ b/docs/examples/risk_models.rst @@ -24,4 +24,4 @@ This example script is .. literalinclude:: ../../examples/risk_models.py :language: python - :lines: 16- + :lines: 35- diff --git a/examples/paper_examples/__init__.py b/examples/paper_examples/__init__.py index e2a941ac1..98f1a15a6 100644 --- a/examples/paper_examples/__init__.py +++ b/examples/paper_examples/__init__.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 a4e02a031..2f99350fe 100644 --- a/examples/paper_examples/common.py +++ b/examples/paper_examples/common.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 2fadfc3a5..2dabe1faf 100644 --- a/examples/paper_examples/data_risk_model.py +++ b/examples/paper_examples/data_risk_model.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 863e1f8b7..94b1c806c 100644 --- a/examples/paper_examples/hello_world.py +++ b/examples/paper_examples/hello_world.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 05fabd487..b6d8081d5 100644 --- a/examples/paper_examples/multi_period_opt.py +++ b/examples/paper_examples/multi_period_opt.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/paper_examples/portfolio_simulation.py b/examples/paper_examples/portfolio_simulation.py index d7324d1e9..b1335d7be 100644 --- a/examples/paper_examples/portfolio_simulation.py +++ b/examples/paper_examples/portfolio_simulation.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 fb6afa0dd..0203b63d4 100644 --- a/examples/paper_examples/rank_and_spo.py +++ b/examples/paper_examples/rank_and_spo.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """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 05fabd487..b6d8081d5 100644 --- a/examples/paper_examples/real_time_optimization.py +++ b/examples/paper_examples/real_time_optimization.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """*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 3fa5d2194..4ad05a888 100644 --- a/examples/paper_examples/single_period_opt.py +++ b/examples/paper_examples/single_period_opt.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """*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 05fabd487..b6d8081d5 100644 --- a/examples/paper_examples/single_period_opt_lin_tcost.py +++ b/examples/paper_examples/single_period_opt_lin_tcost.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """*Work in progress.*""" import cvxportfolio as cvx diff --git a/examples/paper_examples/solution_time.py b/examples/paper_examples/solution_time.py index 05fabd487..b6d8081d5 100644 --- a/examples/paper_examples/solution_time.py +++ b/examples/paper_examples/solution_time.py @@ -15,6 +15,23 @@ # # You should have received a copy of the GNU General Public License along with # Cvxportfolio. If not, see . +# +## 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. """*Work in progress.*""" import cvxportfolio as cvx