From bbf2317c579cc0beb3d1b55be7f5038f59b7844d Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Fri, 5 Oct 2012 16:35:11 -0400 Subject: [PATCH] Saving point for adding license files. --- setup.py | 14 ++++++++++++++ tests/test_algorithm.py | 15 +++++++++++++++ tests/test_delayed_signals.py | 15 +++++++++++++++ tests/test_exception_handling.py | 14 ++++++++++++++ tests/test_finance.py | 15 +++++++++++++++ tests/test_ndict.py | 15 +++++++++++++++ tests/test_optimize.py | 15 +++++++++++++++ tests/test_perf_tracking.py | 15 +++++++++++++++ tests/test_risk.py | 15 +++++++++++++++ tests/test_sorting.py | 15 +++++++++++++++ tests/test_sources.py | 15 +++++++++++++++ tests/test_transforms.py | 15 +++++++++++++++ zipline/algorithm.py | 15 +++++++++++++++ zipline/finance/commission.py | 16 ++++++++++++++++ zipline/finance/performance.py | 15 +++++++++++++++ zipline/finance/risk.py | 15 +++++++++++++++ zipline/finance/slippage.py | 15 +++++++++++++++ zipline/finance/trading.py | 15 +++++++++++++++ zipline/gens/composites.py | 15 +++++++++++++++ zipline/gens/mavg.py | 15 +++++++++++++++ zipline/gens/merge.py | 15 +++++++++++++++ zipline/gens/returns.py | 15 +++++++++++++++ zipline/gens/sort.py | 15 +++++++++++++++ zipline/gens/stddev.py | 15 +++++++++++++++ zipline/gens/tradegens.py | 15 +++++++++++++++ 25 files changed, 374 insertions(+) diff --git a/setup.py b/setup.py index 756a0313..fb7c1af6 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,18 @@ #!/usr/bin/env python +# +# Copyright 2012 Quantopian, 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. from distutils.core import setup diff --git a/tests/test_algorithm.py b/tests/test_algorithm.py index 1928cd08..f908ed7d 100644 --- a/tests/test_algorithm.py +++ b/tests/test_algorithm.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from unittest2 import TestCase from datetime import timedelta diff --git a/tests/test_delayed_signals.py b/tests/test_delayed_signals.py index d698bfb8..24c6f465 100644 --- a/tests/test_delayed_signals.py +++ b/tests/test_delayed_signals.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import os from signal import signal, SIGHUP, SIGINT import time diff --git a/tests/test_exception_handling.py b/tests/test_exception_handling.py index 62306306..269522b8 100644 --- a/tests/test_exception_handling.py +++ b/tests/test_exception_handling.py @@ -1,3 +1,17 @@ +# +# Copyright 2012 Quantopian, 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. from unittest2 import TestCase from collections import defaultdict diff --git a/tests/test_finance.py b/tests/test_finance.py index c4d16202..224b5db2 100644 --- a/tests/test_finance.py +++ b/tests/test_finance.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Tests for the zipline.finance package """ diff --git a/tests/test_ndict.py b/tests/test_ndict.py index 7d185590..b3f88a09 100644 --- a/tests/test_ndict.py +++ b/tests/test_ndict.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from datetime import datetime import pytz diff --git a/tests/test_optimize.py b/tests/test_optimize.py index 9efb972a..ddc8dc48 100644 --- a/tests/test_optimize.py +++ b/tests/test_optimize.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """Tests for the zipline.finance package""" from unittest2 import TestCase, skip from collections import defaultdict diff --git a/tests/test_perf_tracking.py b/tests/test_perf_tracking.py index e2d85752..1fcf8baa 100644 --- a/tests/test_perf_tracking.py +++ b/tests/test_perf_tracking.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import unittest import copy import random diff --git a/tests/test_risk.py b/tests/test_risk.py index 5c5a0d43..a8e71d53 100644 --- a/tests/test_risk.py +++ b/tests/test_risk.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import unittest import datetime import calendar diff --git a/tests/test_sorting.py b/tests/test_sorting.py index 63455bbd..67bf0ff5 100644 --- a/tests/test_sorting.py +++ b/tests/test_sorting.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import pytz from unittest2 import TestCase diff --git a/tests/test_sources.py b/tests/test_sources.py index 1f061358..c121f2e2 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from unittest2 import TestCase import zipline.utils.factory as factory diff --git a/tests/test_transforms.py b/tests/test_transforms.py index a3b63413..e87551c8 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import pytz import numpy as np diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 2fb4f7a9..4379c5b6 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import pandas as pd import numpy as np diff --git a/zipline/finance/commission.py b/zipline/finance/commission.py index df86f4d6..662144ed 100644 --- a/zipline/finance/commission.py +++ b/zipline/finance/commission.py @@ -1,3 +1,19 @@ +# +# Copyright 2012 Quantopian, 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. + + class PerShare(object): """ Calculates a commission for a transaction based on a per diff --git a/zipline/finance/performance.py b/zipline/finance/performance.py index 1d278daa..228a98b8 100644 --- a/zipline/finance/performance.py +++ b/zipline/finance/performance.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Performance Tracking diff --git a/zipline/finance/risk.py b/zipline/finance/risk.py index b589b1a5..32051621 100644 --- a/zipline/finance/risk.py +++ b/zipline/finance/risk.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Risk Report diff --git a/zipline/finance/slippage.py b/zipline/finance/slippage.py index 5f8304a1..fc53fa1d 100644 --- a/zipline/finance/slippage.py +++ b/zipline/finance/slippage.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import pytz import math diff --git a/zipline/finance/trading.py b/zipline/finance/trading.py index fa7a48ae..133b45ba 100644 --- a/zipline/finance/trading.py +++ b/zipline/finance/trading.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + import pytz import logbook import datetime diff --git a/zipline/gens/composites.py b/zipline/gens/composites.py index ad516d6c..02b40f48 100644 --- a/zipline/gens/composites.py +++ b/zipline/gens/composites.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from itertools import chain from zipline.gens.utils import roundrobin, done_message diff --git a/zipline/gens/mavg.py b/zipline/gens/mavg.py index fb683c44..b1e053ad 100644 --- a/zipline/gens/mavg.py +++ b/zipline/gens/mavg.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from numbers import Number from collections import defaultdict diff --git a/zipline/gens/merge.py b/zipline/gens/merge.py index 4127bb84..570341da 100644 --- a/zipline/gens/merge.py +++ b/zipline/gens/merge.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Generator version of Merge. """ diff --git a/zipline/gens/returns.py b/zipline/gens/returns.py index a407a1e0..b1dce3fe 100644 --- a/zipline/gens/returns.py +++ b/zipline/gens/returns.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from zipline.gens.transform import TransformMeta from collections import defaultdict, deque diff --git a/zipline/gens/sort.py b/zipline/gens/sort.py index 9ae4cbdf..76131b3b 100644 --- a/zipline/gens/sort.py +++ b/zipline/gens/sort.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Sorting generator. """ diff --git a/zipline/gens/stddev.py b/zipline/gens/stddev.py index 858924a7..2eeb55b1 100644 --- a/zipline/gens/stddev.py +++ b/zipline/gens/stddev.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + from numbers import Number from collections import defaultdict from math import sqrt diff --git a/zipline/gens/tradegens.py b/zipline/gens/tradegens.py index 4e0081e8..9e56784e 100644 --- a/zipline/gens/tradegens.py +++ b/zipline/gens/tradegens.py @@ -1,3 +1,18 @@ +# +# Copyright 2012 Quantopian, 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. + """ Tools to generate trade events without a backing store. Useful for testing and zipline development