Metadata-Version: 2.1
Name: msqd
Version: 0.0.1
Summary: Trading strategy development and deployment
Author: Samuel Naughton Baldwin
Author-email: Samuel Naughton Baldwin <sam.naughton2000@gmail.com>
License: MIT License        
        Copyright (c) 2022 Sam NB        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: Homepage, https://github.com/samnaughtonb/msqd
Description-Content-Type: text/markdown
License-File: LICENSE

# msqd

The `msqd` library (pronounced "em squared") is a small boilerplate library for designing, testing and spinning up trading algorithms using Python.

### Notes
- Upon class instantiation, ping database to get timestamps for which we have data, whether this is the downsampled timestamps or the timestamps we got from the database, and maybe some record of the furthest lookback would have to consider to get well-defined features.
- What data do we need to get from the database? How/where shall we cache it? For how long? Either we need to get some data and compute the feature value OR we already know (or can work out) that we won't yield any more information by pinging the database again and should just return the most recent value available.

### Design Goals
- We build up trading systems and strategies by composing functions. For example, we may have a filtering layer where we only trade a particular strategy when certain conditions are met; we may filter instruments. 
- A strategy is a function: it has some fixed parameters and it has some time-dependent inputs.
- What is the most convenient way to define strategies?
- We require full-stack control: we can spin up strategies using simple moving averages really quickly but can also do deep market-making strategies with full control over individual orders, sizes, etc.
- Pass to Rust for calculations that are really really slow. Most of the time, numpy calculations will be working fine.
- Let certain features augment multiple values, e.g. `RETURNS[-5:]` would give the most recent 5 returns (according to some frequency), even though it is just one input in the code.  
