-------------------------------------------------------------------------------

FORK MAINTAINER NOTE

This repository is a fork of the ArbitrageLab (mlfinlab) project. The original 
code and all modifications remain subject to the Hudson and Thames Quantitative 
Research License terms below. 

Fork Maintainer: Vadim Surin <vdmsurin@gmail.com>
-------------------------------------------------------------------------------

Copyright 2019, Hudson and Thames Quantitative Research

Copyright Protection Notice and Licensing Agreement

LAST UPDATED November 2021

IMPORTANT NOTICE! THE USER OF THIS CODEBASE IS SUBJECT TO ALL THE TERMS AND CONDITIONS IN THIS AGREEMENT. THEREFORE,
PLEASE SCROLL THROUGH AND READ ALL OF THE TERMS AND CONDITIONS IN THIS AGREEMENT CAREFULLY BEFORE MAKING USE THEREOF.
THIS DOCUMENT IS A LEGALLY BINDING AGREEMENT BETWEEN YOU AND HUDSON AND THAMES FOR YOUR CONTINUED USE OF THE CODEBASE.

YOU WILL INDICATE YOUR ACCEPTANCE OF THIS AGREEMENT, INCLUDING ANY TERMS AND CONDITIONS, BY DOING ONE OR MORE OF THE
FOLLOWING. OR ALLOWING OR AUTHORISING A THIRD PARTY TO DO ONE OR MORE OF THE FOLLOWING FOR YOU:

* CLICKING “I AGREE” OR A SIMILAR AFFIRMATION AS APPLICABLE WHICH APPEARS DURING THE ACTIVATION OR INSTALLATION OF THE CODEBASE, OR
* ACCESSING, INSTALLING OR USING THE CODEBASE, OR
* SIGNING UP TO ANY SUBSCRIPTION BASED LICENSE CONCERNING THE CODEBASE.

IF YOU DISAGREE TO BE LEGALLY BOUND BY THE TERMS OF THIS AGREEMENT, THEN YOU SHOULD IMMEDIATELY CEASE MAKING USE OF THE
CODEBASE IN ANY WAY AFTER THAT.

AS THIS IS A PERPETUAL LICENSE AGREEMENT, HUDSON AND THAMES MAY UPDATE THE LICENSE AGREEMENT TERMS AT ANY TIME. THE MOST
RECENT VERSION OF THIS AGREEMENT CAN BE ACCESSED ON THE HUDSON AND THAMES WEBSITE.

HUDSON AND THAMES WILL MAKE REASONABLE EFFORTS TO COMMUNICATE ANY CHANGES TO THIS AGREEMENT BY SENDING AN EMAIL TO YOUR
USER ADDRESS OR BY NOTICE ON ITS WEBSITE. THE ONUS HOWEVER REMAINS ON THE USER TO ENSURE THAT THEY REGULARLY CHECK, READ,
UNDERSTAND AND AGREE TO THE MOST RECENT VERSION OF THE LICENSE AGREEMENT AS THEY WILL BE DEEMED TO ACCEPT ANY SUBSEQUENT
AMENDMENTS TO IT IF THEY CONTINUE TO ACCESS AND USE THE CODEBASE.

PLEASE NOTE THAT A BUSINESS OR ENTERPRISE LICENSE AGREEMENT OVERRIDES THIS AGREEMENT BUT THIS LICENSE IS THE DEFAULT FOR
NON BUSINESS LICENSE AND ENTERPRISE LICENSE HOLDERS. THESE LICENSES CAN BE PURCHASED FROM HUDSON AND THAMES QUANTITATIVE
RESEARCH.


DEFINITIONS

In this agreement, unless otherwise specified, the words hereunder shall have the following meaning:

1.1	"Addendum" means any other Agreement signed by both parties and made part of this Agreement.

1.2	"Add-on" means any development that adds new and independent functionality but does not modify existing License
Material functionality developed by the Company.

1.3	"Affiliate" means, depending on the context, any legal entity connected with or controlled by the Company or the
Licensee as the case may be.

1.4	"Agreement" means ArbitrageLab Business License Agreement as well as any Addendums hereto.

1.5	"Breach" means a breach of this Agreement, which within context could refer to a breach by the Licensee or the
Company.

1.6	"Business Day" means Monday to Friday excluding Saturday, Sunday, or any other official public holiday of the
Country.

1.7	"Business Environment" means all internal and external factors of the Licensee's or Company's businesses, such
as the business's premises, operations, employees, management, and owners.

1.8	"Company" means Hudson and Thames Quantitative Research.

1.9	"Country" means the Country of jurisdiction and whose laws apply to the Agreement as per clause 1.3.8.

1.10	"Documentation" means any official Company documentation detailing the appropriate use or operation of the
Licensed Materials.

1.11	"Effective Date" means the commencement date of this Agreement as specified in clause 1.3.3.

1.12	"Expiry Date" means the date the license expires as per clause 1.3.4; alternatively, the date either party
cancels the Agreement in

terms of their rights in this Agreement, alternatively, any legislation.

1.13	"License Fees" means the license fees payable by the Licensee to the Company as referred to in clause 1.3.7.

1.14	"Licensed Materials" means the ArbitrageLab Python library (including source code) comprising a collection of
production-ready algorithms.

1.15	"Licensee(s)" means the party specified in clause 1.2 hereof.

1.16	"Modification" means a change to the delivered source code or data; or any development, other than a change
to the provided source code that customises, enhances, or changes existing functionality of the Licensed Materials
including, but not limited to, the creation of any new libraries or the extension of the Company's data structures;
or any other change to the Licensed Materials (other than an Add-on) utilising or incorporating any of the Company's
Licensed Materials.

1.17	"Month" means a full calendar month beginning on the 1st day and ending on the last day of the particular month.

1.18	"Notice Address" means the chosen address where all notices, including Legal notices, are served in the event
of service of such notices are necessary.

1.19	"Parties" means the Company and the Licensee to this Agreement.

1.20	"User" means the End User of the Licensed Materials referred in the Agreement as the "End-User".

1.21	"VAT" means the Value Added Tax rates for goods and services applicable.

1.22	"Webhooks" means an HTTP callback triggered within the Licensed Material when a specific event has occurred.


INTERPRETATION

3.1	Any reference to the singular shall be deemed to include a reference to the plural, and the other way around.

3.2	Any reference to a natural person shall include a reference to a legal person/juristic entity (Company,
corporation, or trust) and the other way around where relevant.

3.3	A reference to a clause in this Agreement shall refer to the specific numbered clause referred to and contained
within this Agreement, or any Addendum forming part of this Agreement.

3.4	Paragraph headings are for reference purposes only.

3.5	Any reference to "writing" or "written" in this Agreement shall be viewed to include a reference to any letter,
email, or other electronically delivered messages (such as SMS or other electronic messaging services) where receipt
has been acknowledged by the recipient, alternatively proof of receipt offered by the sender.


INTRODUCTION

4.1	Whereas the Company is in the business of implementing algorithms in quantitative finance and developing various
libraries used by its client base worldwide. These algorithms are created using several graduate-level textbooks and
dozens of papers from several of the world's leading academic journals.

4.2	Whereas the Company has compiled, collected, and assembled the collection of algorithms into Python libraries which
is accessible via a Python package install command. These library collections are referred to as ArbitrageLab.

4.2	Whereas the Licensee is desirous of using the Company's ArbitrageLab algorithms within its internal Business
Environment.

4.3	Whereas the Company is desirous of granting the Licensee a non-exclusive license to have access to the Company's
ArbitrageLab libraries.

4.4	Whereas the Licensee agrees as from the effective date of this Agreement, to enjoy the non-exclusive right to use
the Licensed Material on the terms and conditions set out in this Agreement.


GRANT OF LICENSE

5.1	Subject to the terms and conditions hereof, the Company hereby grants to the Licensee a non-exclusive license
to use, access, inspect, install and implement the Licensed Materials in the Licensees internal Business Environment,
unless terminated or withdrawn under the terms of this Agreement.


TERMS OF USE OF LICENSE

6.1	The Licensee may use the Licensed Material in furtherance of its permitted use under this Agreement and shall be
allowed to use the Licensed Material under the provisions of this clause 6 hereof unless otherwise set out in this
Agreement.

6.2	The Licensed Material may only be used and adapted by the Licensee Users within their internal Business Environment,
including the licensees' projects and applications. The Licensee shall not use the Licensed Materials to provide
information or services to third parties other than affiliated or authorised persons within its Business Environment
(i.e., traders).

6.3	The Licensee acknowledges the Company's proprietary rights in the Licensed Material, and that the copying, or even
observation by un-related parties of the Licensed Material for any reason other than the intended use thereof within
its Business Environment, or without the explicit written consent by the Company, is prohibited.

6.4	The Licensee is not permitted to create API endpoints or create data or forecast services using the Licensed
Material without the Company's explicit written authorization, other than solely for Licensee’s internal business
activities (which expressly excludes dissemination or provision of access to the Licensed Material to any third party).

6.6	The Licensee shall not lease, loan, resell, sublicense or otherwise distribute the Licensed Materials to any other
party or distribute or publish the source code or perform any acts concerning the Licensed Materials other than as
expressly permitted under the terms of this Agreement.

6.7	The Licensee and its Users undertake not to reverse engineer the Licensed Materials and agrees not to set up in
business as a direct competitor of the Company using the Company's Proprietary Information. The Licensee will be
responsible for damages suffered by the Company for any violation of this paragraph if it is proved or admitted.

6.8	The Licensee agrees to install the Licensed Materials only on the maximum number of designated Users as specified
in clause 1.3.6 hereof and on devices which may be located in the business premises of a User or be in the Users'
direct possession. The Licensee shall not install the Licensed Materials on any other third-party workstations
operating outside of the Licensees Business Environment.

6.9	The Licensed Material may be installed by way of a package installer for Python on the Licensees preferred
interface or any other system within the Licensees Business Environment.


COMPANY WARRANTY

7.1	The Company warrants that the Licensed Material will be available and substantially conform to the standards
required for an Integrated Development Environment Python Deployment Package for the license term's duration.

7.2	The Company warrants that the source code will be protected by sound source control principles and changelog
indexes for all tools, allowing for protection against any breaking changes in the source code and reverting to the
software's previous version, should the need arise.

7.3	The warranty does not apply:

    7.3.1	if the Licensed Material is not used under the Documentation or Tutorials provided by the Company;

    7.3.2	if the nonconformance of the Licensed Material is caused by any Modification or Add-on (other than any
    Modifications, updates, or Add-ons made by the Company provided through the Company's package update or support
    system), the Licensee, another third party, third- party software, third party database or any other software or
    system not affiliated to the Company;

7.4	The Company does not warrant that the Licensed Materials will be free from minor defects or errors that do not
materially affect its performance, or that the libraries and documentation contained in the Licensed Materials are
designed to meet all of Licensee's business requirements.

7.5	The Licensee undertakes to notify the Company in writing with a specific description of the Licensed Materials
errors during the terms of the license. If the Company confirms the existence of such errors, the Company will, to its
best endeavours, repair or replace the Licensed Materials within 14 (fourteen) days from date of such confirmation.

7.6	The Licensee's written notification of any software bugs must include sufficient detail for the Company to analyse
the alleged nonconformance. Licensee must also provide all reasonable assistance to the Company to diagnose and remedy
any Licensed Materials' nonconformance.


LIMITATION OF LIABILITY

8.1	The Company shall not be responsible under this Agreement

    8.1.1	if the Licensed Material is not used as per the documentation and tutorials provided;

    8.1.2	if the nonconformance of the Licensed Material is caused by any Modification or Add-on (other than any
    Modifications, updates or Add-ons made by the Company provided through the Company's package update or support
    system), the Licensee, another third party, third- party software, third party database or any other software or
    system not affiliated to the Company;

8.2	Subject to the provisions of clause 8.3 and 8.4 below and regardless of the basis of liability (whether arising out
of liability under breach of contract, damages (including gross negligence), misrepresentations, breach of warranty,
or claims by any unrelated parties arising from any breach of this Agreement) neither the Company nor Licensee shall
be liable to each other or any other party for any loss or damages arising concerning this Agreement to the extent
that such loss or damage is:

    8.2.1	loss of profits or revenue, loss of business, loss of or damage to data, loss of goodwill, losses from
    computer failure or malfunction, legal fees, loss of anticipated profits or savings, and regardless of whether any
    such loss or damage listed in this sub-section is direct, indirect, special, incidental or consequential;

    8.2.2	is indirect, special, incidental, or consequential and whether or not the other party is advised of the
    possibility of such loss or damage;

8.3	Subject to the provisions of clause 8.2 above and regardless of the basis of liability (whether arising out of
liability under breach of contract, damages (including gross negligence), misrepresentations, breach of warranty,
or claims by any unrelated parties arising from any breach of this Agreement) the aggregate liability of each party
to the other or any other party for any loss or damage arising under or concerning this Agreement shall not exceed the
license fees paid to the Company in respect of this Agreement.

8.4	Nothing in this Agreement shall exclude or limit either party's liability which cannot be excluded or limited by
any applicable law in the Country of Jurisdiction.

8.5	Any limitations to the Company's liability and obligations according to this clause 8 will also apply for the
benefit of any member or affiliate of the Company and their respective licensors.


BREACH OF CONTRACT BY THE LICENSEE

9.1	If the Licensee:

    9.1.1	fails to pay any fees due in terms of this Agreement on the due date thereof; or

    9.1.2	breaches this Agreement in any other way;

and fails to remedy such breach within 5 (Five) days after service of a written notice to the Licensee calling for such
remedy, alternatively

    9.1.3	is placed under provisional or final sequestration during the term of this Agreement;

    9.1.4	commits any unlawful act, or is found guilty of a crime in any country anywhere in the world,


the Company shall have the right, without prejudice to any alternative or additional right of action or remedy
available to the Company under the circumstances (including the right to claim specific performance), to

    9.1.5	cancel this Agreement and forthwith.

9.2	Any termination or declaration of termination of this Agreement shall not have the effect of cancelling any of the
Company's rights that accrued before the termination or any other obligation of the Licensee which arises on termination
of this Agreement.


BREACH OF CONTRACT BY THE COMPANY

10.1	If the Company commits any breach of contract and fails to remedy the breach within 5 (Five) days after
receiving notice by the Licensee at the chosen notice address, the Licensee shall have the right to:

    10.1.1	terminate this Agreement without any liability for early termination;

10.2	Notwithstanding the provisions stipulated in clause 10.1, the Licensee shall remain liable for any fees which
may be due as at the date of terminating this Agreement in terms thereof.


NOTICES BETWEEN PARTIES

11.1	Any notice required to be sent to either party shall be delivered to either party in writing to their respective
physical addresses (as set out in 1.1 and 1.2 hereof) alternatively transmitted by electronic email to the specified
email address stipulated in this Agreement.

11.2	Any notice, order, acceptance, demand, or other communication addressed by either party to this Agreement to
the other party at its notice address or email address in terms hereof for the time being shall be deemed received by
the addressee:

    11.2.1	on the date of receipt of service of the notice if the notice is served by hand;

    11.2.2	on the 5th Business Day after dispatching the notice by prepaid registered post;

    11.2.3	on the date of transmission of the notice if electronically transmitted by email;

11.3	This provision shall not be construed as precluding the other party using any other delivery methods of notices,
orders, acceptances, demands, and other communications that the parties can prove.

11.4	All legal processes shall be regarded as validly served if served at a party's notice address, whether the party
is present at the notice address at the time of service or not.


JURISDICTION OF COURTS AND GOVERNING LAWS

12.1	This Agreement is governed by the laws of the Country specified in clause 1.3.8.


CONSENT AND THE PROTECTION OF PERSONAL INFORMATION

13.1	Consent, Acknowledgment, and acceptance is given to the Company by the Licensee for the following conditions of
personal information usage.

13.2	The Company will only with the explicit consent of the Licensee or that of the individual Users (either
submitted electronically, verbally, or in writing) share the personal information of the Licensee or individual
Users with any employees and personnel, selected partners, subsidiaries, and contracted third parties. The consent
provided may be used to:

    13.2.1	share personal contact information electronically with the parties aforementioned;

    13.2.2	store personal information in secure storage (either on-site or online) for record-keeping purposes;

    13.2.3	use personal information for the purposes recording same into the Company's software systems for the purposes
    required to run and manage any aspect of its business activities, including but not limited to user registrations and
    User identifiers;

    13.2.4	use personal information for marketing purposes;

    13.2.5	retain personal information for the required periods as required by the applicable laws at the time;


13.3	The Licensee and User information may be electronically transferred and shared with the parties above who will
access, view, and store this personal information.

13.4	Although the Company undertakes to take all reasonable steps to protect this personal information and maintain
the Licensee and User information confidentiality, the Company cannot guarantee the security or integrity of any information transmitted (either electronically, verbally, or in writing) and that any information so submitted shall be at the Licensee and Users own risk.

13.5	The Licensee acknowledges that once the Company shares any personal information to any parties above (as per
clause 13.2 hereof), the Company shall not have any control over this personal information once shared and will not be
responsible for the security of any personal information after that.

13.6	The Company confirms compliance with the relevant and necessary data protection laws applicable to the Country
from time to time commit to applying all safety and security measures whilst this information is under the Company's
control.


PROPRIETARY INFORMATION

14.1	This Agreement creates a relationship of confidence and trust between the Licensee, the Users, and the Company
relating to information which may be made known, presented or accessed by the Licensee and its Users during the term of
this Agreement.

14.2	The Company possesses information that has been created, researched, or developed by the Company (including
information created, researched or developed or made known to the Licensee during the term of this Agreement or in which
intellectual property rights may have been assigned to the Company from other sources), which information has commercial
value to the business in which the Company is engaged and is treated by the Company as confidential. All such
information referred to as "Proprietary Information". This term shall also include systems, algorithms, data, source
code, computer programs, improvements, discoveries, developments, techniques, new products, and licenses; The term
"Proprietary Information" does not include any of the information herein that is already part of the public domain.

14.3	All Proprietary Information herein shall be the Company's property and its assigns, who shall remain the sole
owner of all rights, including any patents, copyrights, trademarks, and other rights obtained in connection therewith.

Unauthorised use

14.4	Having regard to the terms of use of the Licensed Material as per clause 6 hereof as well as clause 14.1,
14.2, and 14.3 hereof, and subject to the provisions of clause 9 and 10 hereof, the Licensee acknowledges that it may
make any modifications or alterations to the Source Code at their discretion; however, such right does not include the
right to distribute or create other commercially available products containing substantial portions of the original
Licensed Materials of the Company.

14.5	The Licensee agrees not to lease, loan, resell, sublicense or otherwise distribute any software or product
based on improvements or alterations made to the Licensed Materials to any other party or distribute or publish the
source code or perform any acts concerning improvements containing substantial portions of the original Licensed
Materials of the Company.

Webhooks

14.6	The Licensee acknowledges that the Company has created webhooks to verify Licensee and user authentications,
user, installations, daily usage information, and track function calls and source code modifications.

14.7	Webhooks trigger upon installation of the Licensed Material and during specific function calls. During these
events, no proprietary data from the Licensee passes through any of the Company Servers.

14.8	The Webhooks are contained in the Licensed Material source code and can be inspected to analyse where the
Company uses analytics, tracks function calls.


NON-WAIVER

15.1	No relaxation or indulgence which the Company may show to the Licensee shall in any way prejudice their rights
hereunder.


SEVERABILITY

If any provision of this Agreement is unenforceable for whatever reason, the Company shall be entitled to elect, at any
time, that such provision is severed from the remaining provisions of this Agreement, the result of which shall not
affect the remaining provisions of this Agreement which shall remain of full force and effect.


WHOLE AGREEMENT

This Agreement constitutes the entire Agreement between the parties. No modification, variation, alteration, or
consensual cancellation shall be of any force or effect unless reduced to writing and signed by the parties.