# Path: alephnull/transforms/utils.py
# class TransformMeta(type):
#     """
#     Metaclass that automatically packages a class inside of
#     StatefulTransform on initialization. Specifically, if Foo is a
#     class with its __metaclass__ attribute set to TransformMeta, then
#     calling Foo(*args, **kwargs) will return StatefulTransform(Foo,
#     *args, **kwargs) instead of an instance of Foo. (Note that you can
#     still recover an instance of a "raw" Foo by introspecting the
#     resulting StatefulTransform's 'state' field.)
#     """
# 
#     def __call__(cls, *args, **kwargs):
#         return StatefulTransform(cls, *args, **kwargs)


from alephnull.errors import WrongDataForTransform
from alephnull.transforms.utils import TransformMeta
from collections import defaultdict, deque
#
# Copyright 2013 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 Returns(object):
    """
    Class that maintains a dictionary from sids to the sid's
    closing price N trading days ago.
    """

# Path: alephnull/transforms/utils.py
# class TransformMeta(type):
#     """
#     Metaclass that automatically packages a class inside of
#     StatefulTransform on initialization. Specifically, if Foo is a
#     class with its __metaclass__ attribute set to TransformMeta, then
#     calling Foo(*args, **kwargs) will return StatefulTransform(Foo,
#     *args, **kwargs) instead of an instance of Foo. (Note that you can
#     still recover an instance of a "raw" Foo by introspecting the
#     resulting StatefulTransform's 'state' field.)
#     """
# 
#     def __call__(cls, *args, **kwargs):
#         return StatefulTransform(cls, *args, **kwargs)


# Path: alephnull/transforms/returns.py
from alephnull.errors import WrongDataForTransform
from alephnull.transforms.utils import TransformMeta
from collections import defaultdict, deque

#
# Copyright 2013 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 Returns(object):
    """
    Class that maintains a dictionary from sids to the sid's
    closing price N trading days ago.
    """

    __metaclass__ = TransformMeta