Skip to content

Instantly share code, notes, and snippets.

View imspzero's full-sized avatar

lzd imspzero

  • Canberra, Australia
View GitHub Profile
@ceshine
ceshine / bactrader_sample.py
Last active July 22, 2024 07:35
A Simple Strategy Trading Two Stocks (back trader)
"""A Simple Strategy Trading Two Stocks
Original code: https://blog.csdn.net/qq_26948675/article/details/80016633
Modified based on: https://www.backtrader.com/blog/posts/2018-04-22-improving-code/improving-code.html
Replaced the local CSV files with online data from IEX.
Unfortunately, this strategy is not profitable for the two stocks picked.
"""
@mementum
mementum / vanktharp-coinflip.py
Created August 26, 2019 21:34
Beating The Random Entry
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
# Copyright (C) 2019 Daniel Rodriguez - MIT License
# - https://opensource.org/licenses/MIT
# - https://en.wikipedia.org/wiki/MIT_License
###############################################################################
import argparse
import random