Skip to content

Instantly share code, notes, and snippets.

What would you need:

Hardware requirements

import alpaca_trade_api as tradeapi
api = tradeapi.REST(key_id=<your key id>,secret_key=<your secret key>)
class positionHandler:
def __init__(self,startingBalance=10000,liveTrading=False):
self.cashBalance = startingBalance
self.livePositions = {} # Dictionary of currently open positions
self.openOrders = [] # List of open orders
self.positionHistory = [] # List of items [Symbol, new position size]
/*
NB: erste Zeile je die Bipartitionen, zweite Zeile die Konfidenzen dazu (gerundet auf zwei Nachkommastellen).
*/
false,false,false,false,false,true
[ 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, ]
true,false,false,false,false,false
[ 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, ]
false,false,false,false,false,true
package put.mlc.examples.pcc;
import mulan.classifier.MultiLabelOutput;
import mulan.data.MultiLabelInstances;
import put.mlc.classifiers.pcc.PCC;
import put.mlc.classifiers.pcc.inference.Inference;
import put.mlc.classifiers.pcc.inference.montecarlo.FMeasureMaximizerInference;
import put.mlc.classifiers.pcc.inference.ExhaustiveInference;
import weka.classifiers.functions.Logistic;
import weka.core.Instances;
@ChristianSch
ChristianSch / geneticAlgorithms
Created May 6, 2018 09:02 — forked from thertrader/geneticAlgorithms
Using Genetic Algorithms in Quantitative Trading
############################################################
## Using Genetic Algorithms in Quantitative Trading
##
## thertrader@gmail.com - Mar 2014
############################################################
library(PerformanceAnalytics)
library(rgenoud)
library(quantmod)
library(TTR)
#!/bin/sh
case "$1" in
bundlerextension)
jupyter-bundlerextension ${@:2}
;;
console)
jupyter-console ${@:2}
;;
kernelspec)
@ChristianSch
ChristianSch / tmux-cheatsheet.markdown
Created September 9, 2017 16:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.kwm</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/kwm/kwm</string>
</array>
@ChristianSch
ChristianSch / fish-prompt.sh
Created November 10, 2016 13:21 — forked from gak/fish-prompt.sh
My custom fish prompt code explained at http://geraldkaszuba.com/tweaking-fish-shell/
function _common_section
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c2
printf $argv[2]
printf $argv[3]
printf $c0
printf ", "
{-# LANGUAGE OverloadedStrings #-}
module Main where
{-
This is the main entry point for the multi label correlation coefficient
microservice which listens to RPC calls for applications which need to work
with computed data about the label correlation coefficients, i.e. data viz
in dashboards and such. The data is fetched from a MySQL database.
-}