GithubHelp home page GithubHelp logo

adlai / scalpl Goto Github PK

View Code? Open in Web Editor NEW
59.0 15.0 20.0 1.21 MB

volatility harvester prototype

Home Page: atp://127.0.0.1:8080

Common Lisp 100.00%
limit-order-book volatility-harvester games-against-nature

scalpl's Introduction

  SSSSSS==cCCCCc===aAAa======LL&=====PPPPPP===LL&====
#SS----#-#CC--CC--#AAAAa----&LL#----&PPo--PP#&LL#----
o=&SSs===#&c======#AA==Aa=-=#LLo====&PPPPPP&##LLo====
--#-&SSS##&Cc-CCC#oAAaaaAA--#LLo----#PPP#==-##LLo----
#SSSSSS###=&CCCC=o=&A===&AA#oLLLLLL##PP#=o==ooLLLLLL#
#.#&#.#.oo.o#.#..o.##...&#Aoo.#o&..o#P#o.o..oo.#o&..o
 o.#..o.o..o..#...`.o...##.oo.o.#..o&#.o..`..o.o.#..o
   o..o.`o..`..`.....`..#.`o..o.o..`oo..`.....`o.o...
      o..o..o..markets..o...`..`.o..o.`..lisp...`o..o
            o.............mayhem..`..`............`..

"scalpl is a project written by someone who is clearly having a great time" - @byrneseyeview

Legal-ease

The software is provided devoid of warantee, guarranty, liesense, and noncence: "do as thou wilt".

Please be advised that this use of the software renders varying signals to market participants in a manner that amplifies pre-existing biases. Performing such acts in jurisdictia where the potential consequences of such actions are punishable is liable to offend my religion, and should be considered a capital offense, insofar as such are punishable by and large small etc etc etc.

The concurrancy mechanisms employed by the procurrency silencer have been empirically demonstrated to contain faults, and it is thus a great way to have a bad time if you rely on the source code without reading it, aloud!

PROCLAIMER REGARDING CONTINUITY

Reports of roughness and density have been greatly adjagitated; thus, if you have suggestions for theme songs, please speak, although you are encouraged to consider whether music is merely a part of nature, xor the imposition from without of order upon chaos.

Abstract

There will be an engine for expressing arbitrarily intricate policies for financial planning, execution, and study thruwaut ; today, it is hardcoded as a market maker. We also endeavor to provide a constructive extension of Kerckhoffs's Law to game theory, although it may require [un?]countably infinitely many steps.

Exchanges

Several exchanges were supported: Bitfinex, BTC-e, and Kraken. ScalpL also supported MPExAgent, and if your hand still plays such tables, there is no conceivably indubitable reason for such bits to have rot; fresh additions are clients for the Baloney Exchange, and hazardous support for casinos such as bitmexicom, and someday, maybe, also, ones that do not require selfies, residences, etc.

Requirements

The following Common Lisp compilers are tested regularly:

The following almost suffice, although not quite:

Please let me know if you use this program with other compilers.

Excuses and Explanations

  • Kevin Simler's thoughts on wealth, specifically parts II-IV (the "Congolese Trading Window"), outline the ideological basis;

  • Christ Stucchio's HFT Apology outlines the mechanics of automated market making (ie, real world Congolese Window Trading);

  • Peter Seibel's introduction to the excellent Practical Common Lisp lays out the factors behind the unconventional yet unavoidable language choice; the book itself lights the larval lisper's quest; and

  • Timothy B Lee's cards summarize the Bitcoin phenomenon for the unfamiliar, purely as enrichment; though catalyzed by cryptocurrency, ScalpL itself is agn-asset-ic.

Current Status

This program is a work in progress, built by a "Lone Wolf" madman. You should thus expect rudeness and flippancy, unless you pay for a consultation.

Nature of the Beast

  • Please be a where of false friends, read ear rings, and closed enemies.

  • Harvesting progresses best when the market moves harmoniously with the configured parameters: for example, the most profitable targeting for a market which trends sideways will be equal allocation.

  • Allocation too far in the "wrong" direction other results in the harvester accumulating the asset unloaded by other market participants, eventually getting "run over": the portfolio is sufficiently imbalanced to prevent further market making. One can either wait for the trend to reverse, or rebalance at a loss.

  • Poorly calibrated resilience also weakens returns: if the resilience is too high compared to current market activity, execution volume suffers; too low, and the increased volume is only beneficial when the market moves match the targeting feedback cycle (mismatch accelerates the "running-over").

  • The specific version of Murphy's Law applicable here is that if you ever look back at the screen after your account was profitable, you will find that it has managed to enter a losing position while your attention was elsewhere.

Past Performance

  • Although it's more indicative of others' past shame, than anybody's future luck, there were a dozenscore happy days aiming at an APR north of a lucky number seven.

  • There is no cause for suspicion of bucket shop shenanigans below sustained alpha extrapolating to quarterly doublings. Although daily alpha can easily cross this level due to the misfortunes of others, a weekly sustain has yet to be witnessed.

scalpl's People

Contributors

adlai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalpl's Issues

#'print-book edge case displays our offer twice

Nasty little roach, already present at 5340c15:

   #<BID 0.00market CxBTC @ 0.00higher>  #<456790 amt S.MPOE @ 0.0000best>
   #<BID 0.0000ours CxBTC @ 0.000lower> #<ASK amount. S.MPOE @ 0.00better>
#<456789 0.0000ours CxBTC @ 0.000lower> #<456791 amnt S.MPOE @ 0.0000good>

Mother of god

incredibly robust repo.

I've gone through in every effort to teach myself compiling this repo and running, via emac/slime.

Any tutorials handy, or a kick in the right direction at least ? @adlai

Do Something Useful

Preferably, from a personal computer that was simultaneously running Microsoft Excel at the same time that the software in this repository crashed; although examples of permissible alternatives to Windows RG, NT, ME, etc include Macintosh, Ubuntu, and other free software installations capable of executing programs compiled for the closed-source monopoly, it is most preferable to have the crash report be from a desktop machine that was located inside the trader's office.

Does not build - argument count error

Build log is here: http://report.quicklisp.org/2016-08-15/failure-report/scalpl.html#scalpl

I get:

; file: /home/quicklisp/quicklisp-controller/dist/build-cache/scalpl/dcddb500ae183a0df38ce2ad4c1cd271502d2738/scalpl-20160815-git/btce.lisp
; in: DEFMETHOD GATE-POST ((EQL *BTCE*) T T T) => DEFPARAMETER +KLUDGE+
;     (ERROR)
; 
; caught WARNING:
;   The function was called with zero arguments, but wants at least one.
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1003327653}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "scalpl" "btce">

No clear instructions

I've loaded the bot, and all of the dependencies, with Quicklisp. But there's no clear guide on what to do next. I know I need to set the API keys, and some parameters, but there's no indication on how to do it. Any help? I intend only to experiment by the way, I don't expect this to be a magic money maker.

Literacy

One fifth of a bitcoin, in exchange for a series of commits that add a comment block before each toplevel form, explaining why each is, as it is; half of the remaining four, at hundredth resolution, as bonus for quality of improvements suggested by the text; the remaining two fifths are allocated for a bonus incentivising concision of writing, and will be automatically retained should the number of bytes added to the repository be larger than its current size.

For an example of a commit that could, quite plausibly, be part of such a series, see 10d7e11

Epic failure while parsing JSON

(:debug 0 1
        ("Fault during read of memory address #x8" "   [Condition of type CCL::INVALID-MEMORY-ACCESS]" nil)
        nil
        ((0 "(JSON::DECODE-JSON-STRING #<Unknown Arguments>)")
         (1 "(JSON::DECODE-JSON-OBJECT #<Compiled-function SYMBOL-VALUE #x30000010C2BF>)")
         (2 "(JSON:DECODE-JSON-FROM-STRING \"{\\\"table\\\":\\\"orderBookL2\\\",\\\"action\\\":\\\"update\\\",\\\"data\\\":[{\\\"symbol\\\":\\\"XBTUSD\\\",\\\"id\\\":8799378950,\\\"side\\\":\\\"Buy\\\",\\\"size\\\":77656}]}\")")
         (3 "(SCALPL.UTIL:READ-JSON \"{\\\"table\\\":\\\"orderBookL2\\\",\\\"action\\\":\\\"update\\\",\\\"data\\\":[{\\\"symbol\\\":\\\"XBTUSD\\\",\\\"id\\\":8799378950,\\\"side\\\":\\\"Buy\\\",\\\"size\\\":77656}]}\")")
         (4 "((:INTERNAL SCALPL.BITMEX::HANDLE-MESSAGE SCALPL.BITMEX::MAKE-ORDERBOOK-SOCKET) \"{\\\"table\\\":\\\"orderBookL2\\\",\\\"action\\\":\\\"update\\\",\\\"data\\\":[{\\\"symbol\\\":\\\"XBTUSD\\\",\\\"id\\\":8799378950,\\\"side\\\":\\\"Buy\\\",\\\"..")

Little remains to be writ.

Failure on CCL 1.11.5 x64

There is no applicable method for the generic function:
  #<STANDARD-GENERIC-FUNCTION SLOT-VALUE-USING-CLASS @1+00gf1>
when called with arguments:
  (#<STANDARD-CLASS SCALPL.EXCHANGE::BOOK-FETCHER>
   #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co2>
   0)
   [Condition of type NO-APPLICABLE-METHOD-EXISTS]

Restarts:
 0: [CONTINUE] Try calling it again
 1: [ABORT] Abort request, restart actor
 2: [ABORT-BREAK] Reset this thread
 3: [ABORT] Kill this thread

Backtrace:
  0: (#<CCL::STANDARD-KERNEL-METHOD NO-APPLICABLE-METHOD (T)> #<STANDARD-GENERIC-FUNCTION SLOT-VALUE-USING-CLASS @1+00gf1> #<STANDARD-CLASS SCALPL.EXCHANGE::BOOK-FETCHER> #<BOOK-FETCHER depth fetcher..
      Locals:
        CCL::GF = #<STANDARD-GENERIC-FUNCTION SLOT-VALUE-USING-CLASS @1+00gf1>
        CCL::ARGS = (#<STANDARD-CLASS SCALPL.EXCHANGE::BOOK-FETCHER> #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co1> 0)
  1: (NIL #<Unknown Arguments>)
;;; (apply #'get-book market get-book-keys)))
  2: (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co2>)
      Locals:
        SCALPL.EXCHANGE::FETCHER = #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co1>
;;; (apply-with-method-context magic method-function args)
  3: (CCL::%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1))
      Locals:
        MAGIC = (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1)
        METHODS = ((#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :BEFORE (SCALPL.ACTOR:ACTOR)>) (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AFTER (SCALPL.ACTOR:ACTOR)>) ..)))
        BEFORES = (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :BEFORE (SCALPL.ACTOR:ACTOR)>)
        CDR-METHS = ((#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AFTER (SCALPL.ACTOR:ACTOR)>) #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)>)
        PRIMARIES = (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)>)
        AFTERS = (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AFTER (SCALPL.ACTOR:ACTOR)>)
        ARGS = @0+if1
        CDR = NIL
        METHOD-FUNCTION = #<METHOD-FUNCTION SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)>
;;; (if (listp (car next-methods)) >>(%%before-and-after-combined-method-dcode magic)<<
  4: (CCL::%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1))
      Locals:
        MAGIC = (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1)
        ARGS = NIL
        NEXT-METHODS = ((#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :BEFORE (SCALPL.ACTOR:ACTOR)>) (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AFTER (SCALPL.ACTOR:ACTOR)>) ..)))
        ARGS = @0+if1
;;; (call-next-method)
  5: (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AROUND (SCALPL.ACTOR:ACTOR)> #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co2>)
      Locals:
        ACTOR = #<BOOK-FETCHER depth fetcher #<XBTUSD on #<BITMEX>> @1+01co1>
        #:NEXT-METHOD-CONTEXT = (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1)
        #:G12013 = #<RESTART ABORT #x..>
        #:G12011 = (#<RESTART ABORT #x..>)
        CCL::%RESTARTS% = ((#<RESTART ABORT #x..>) (#<RESTART ABORT-BREAK #x..> #<RESTART ABORT #x..>))
;;; (apply-with-method-context magic (%method.function car-meths) args)
  6: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AROUND (SCALPL.ACTOR:ACTOR)> (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :BEFORE #>) ..)) @0+if1)
      Locals:
        METHODS = (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AROUND (SCALPL.ACTOR:ACTOR)> (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :BEFORE #>) (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AFTER #>) ..))
        ARGS = @0+if1
        CAR-METHS = #<STANDARD-METHOD SCALPL.ACTOR:PERFORM :AROUND (SCALPL.ACTOR:ACTOR)>
        CELL-2 = (#<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1)
        MAGIC = (NIL #<STANDARD-METHOD SCALPL.ACTOR:PERFORM (SCALPL.EXCHANGE::BOOK-FETCHER)> . @0+if1)
        #:G127327 = #<METHOD-FUNCTION SCALPL.ACTOR:PERFORM :AROUND (SCALPL.ACTOR:ACTOR)>

"What Is This?"

No, this is not Sokoban

Please explain why the form enclosing these lines does not contain the ANSI Common Lisp macro ignore-errors, without clicking either part of the hyperlink immediately preceeding this sentence's comma character.

Does not build with SBCL

14:40 <stassats`> it has (setf name (intern name :keyword)) *exchanges*), where 
      name is a with-slots slots
14:40 <stassats`> so, the first time it's can be a string, then it becomes a 
      keyword, but that's in initial-instance, shouldn't happen twice
14:43 <stassats`> this line 
https://github.com/adlai/scalpl/blob/bdccfd817e01d6b938db1301fe465645d225fba3/kraken.lisp#L154

http://report.quicklisp.org/2015-01-09/failure-report/scalpl.html#scalpl has a log.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.