Giter Site home page Giter Site logo

marketsimulator's Introduction

PJensen

I'm a software architect currently working with Harvard Management Company. My background combines technical knowledge with creativity, allowing me to contribute to diverse software solutions.

I discovered my interest in computers in grade school, an interest that was nurtured at an MIT summer camp. My path led me to a high school internship and eventually to studying software engineering at Canada's Acadia University.

I enjoy problem-solving and approach software development with an empathetic mindset, focusing on user needs. I value teamwork, communication, and ethical software development.

Outside work, my hobbies include skiing, painting, sculpting, drumming, and gardening. Each enriches my life and, in their own way, my work too.

marketsimulator's People

Contributors

huangt avatar pjensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

marketsimulator's Issues

Remove Signal Delegates

Remove the Signal delegates and replace them with abstract (or) virtual methods from the StrategyBase -- this change should affect all pre-existing strategies.

Strategy Graphing Flexibility

The issue here is that between different strategies the metrics that are important change. For example; some strategy may only be interested in RSI while others may only be interested in Volatility. We need to come up with a mechanism to determine which metrics are relevant and somehow tie them into the Strategy to be displayed.

The proposal here is to allow for registration of graphing callbacks / attributes at runtime.

Stock Data Bounds Exceeded

As the ticks progress there is presently nothing preventing the tick(s) to stop. This causes an IndexOutOfRangeException

Technical Indicators

Technical Indicators:

  1. Simple Moving Average (SMA)
    Daily Closing Prices: 11,12,13,14,15,16,17
    First day of 5-day SMA: (11 + 12 + 13 + 14 + 15) / 5 = 13
    Second day of 5-day SMA:(12 + 13 + 14 + 15 + 16) / 5 = 14
    Third day of 5-day SMA: (13 + 14 + 15 + 16 + 17) / 5 = 15
  2. Exponential Moving Average
    SMA: 10 period sum / 10
    Multiplier: (2 / (Time periods + 1) ) = (2 / (10 + 1) ) = 0.1818 (18.18%) EMA: {Close - EMA(previous day)} x multiplier + EMA(previous day)
  3. RSI
                 100
    RSI = 100 - --------
                 1 + RS

    RS = Average Gain / Average Loss
  1. MACD:
    MACD Line: (12-day EMA - 26-day EMA)
    Signal Line: 9-day EMA of MACD Line
    MACD Histogram: MACD Line - Signal Line
  2. Elder Impulse:
    Green Price Bar: (13-period EMA > previous 13-period EMA) and
    (MACD-Histogram > previous period's MACD-Histogram)
    Red Price Bar: (13-period EMA < previous 13-period EMA) and
    (MACD-Histogram < previous period's MACD-Histogram)

Price bars are colored blue when conditions for a Red Price Bar or
Green Price Bar are not met. The MACD-Histogram is based on MACD(12,26,9).

Chart Extents Windowing

As a group-box in the options form there should be some mechanism for changing the running width of the viewing window.

Right now we see all data available as time progresses. This becomes slightly cumbersome as the ticks pile up.

Add Additional Financial Metrics

As of the writing of this issue the only metric available is RSI (relative strength indicator) -- the idea behind this issue is to make available the rest of the FinancialFormula objects.

This is a disruptive change and should thus be considered a strong branching candidate.

Chart Data Constraints

Right now chart data is pulled from the security master -- these should actually be pulled from the ticks that actually happened.

Pause Button

Adding a pause button involves setting timerMain.Enabled = false; when pause is presses and timerMain.Enabled = true; when play is pressed. Ideally the button should be some form of a toggle to save screen space.

Compiled Strategies & Strategy Editor

Instead of having hard-coded trading strategies there we should create a strategy editor.

This issue is fairly involved because it involves runtime compiling of C# and re-integration into the application.

BuySignal
SellSignal

Create Bank and Lending Institution

For leveraged buys using actual interest rates.
Also for -- placing profits in money-market account.

    public enum CreditQuality
    {
        AAA,
        AA,
        A,
        BBB,
        BB,
        B,
        CCC,
        CC,
        C,
        Default,
        None
    }

    public class Bond
    {
        public Bond(double principle, long maturity, float coupon, double yield, CreditQuality creditQuality = CreditQuality.None)
        {
            Principle = principle;
            Maturity = maturity;
            Coupon = coupon;
            Yield = yield;
        }

        public double Principle { get; private set; }
        public long Maturity { get; private set; }
        public float Coupon { get; private set; }
        public double Yield { get; private set; }
        public CreditQuality CreditQuality { get; private set; }

        public double Price
        {
            get
            {

            }
        }
    }
Country Name    Country Code    Indicator Name  Indicator Code  1960    1961    1962    1963    1964    1965    1966    1967    1968    1969    1970    1971    1972    1973    1974    1975    1976    1977    1978    1979    1980    1981    1982    1983    1984    1985    1986    1987    1988    1989    1990    1991    1992    1993    1994    1995    1996    1997    1998    1999    2000    2001    2002    2003    2004    2005    2006    2007    2008    2009    2010    2011    2012
World   WLD GDP (current US$)   NY.GDP.MKTP.CD  1.35961E+12 1.39674E+12 1.49637E+12 1.60941E+12 1.7623E+12  1.94509E+12 2.10966E+12 2.24423E+12 2.41926E+12 2.66224E+12 2.89658E+12 3.20023E+12 3.69694E+12 4.51519E+12 5.21035E+12 5.81172E+12 6.32802E+12 7.16353E+12 8.43508E+12 9.79455E+12 1.10219E+13 1.13098E+13 1.11997E+13 1.14434E+13 1.18781E+13 1.24744E+13 1.47608E+13 1.67669E+13 1.8755E+13  1.96807E+13 2.19853E+13 2.30648E+13 2.46595E+13 2.49999E+13 2.69163E+13 2.97873E+13 3.0395E+13  3.03199E+13 3.02035E+13 3.13242E+13 3.23344E+13 3.21441E+13 3.33932E+13 3.75768E+13 4.22811E+13 4.57122E+13 4.95138E+13 5.58308E+13 6.12436E+13 5.79417E+13 6.32264E+13 7.00204E+13 
World   WLD Lending interest rate (%)   FR.INR.LEND                                                                                                                                                                                                                 
United States   USA GDP (current US$)   NY.GDP.MKTP.CD  5.20531E+11 5.39051E+11 5.79748E+11 6.1167E+11  6.56912E+11 7.12082E+11 7.80761E+11 8.25056E+11 9.01456E+11 9.73385E+11 1.0248E+12  1.1131E+12  1.225E+12   1.3693E+12  1.4859E+12  1.6234E+12  1.8091E+12  2.0136E+12  2.276E+12   2.5435E+12  2.7675E+12  3.1038E+12  3.2277E+12  3.5069E+12  3.9004E+12  4.1848E+12  4.425E+12   4.6989E+12  5.0619E+12  5.4397E+12  5.7508E+12  5.9307E+12  6.2618E+12  6.5829E+12  6.9933E+12  7.3384E+12  7.7511E+12  8.2565E+12  8.741E+12   9.301E+12   9.8988E+12  1.02339E+13 1.05902E+13 1.10893E+13 1.17978E+13 1.25643E+13 1.33145E+13 1.39618E+13 1.42193E+13 1.38983E+13 1.44194E+13 1.49913E+13 
United States   USA Lending interest rate (%)   FR.INR.LEND 4.820833333 4.5 4.5 4.5 4.5 4.535   5.625   5.633333333 6.3125  7.951666667 7.91    5.723333333 5.248333333 8.021666667 10.79833333 7.8625  6.84    6.824166667 9.056666667 12.66583333 15.26583333 18.87   14.86083333 10.79416667 12.0425 9.933333333 8.3325  8.203333333 9.315   10.87333333 10.00916667 8.463333333 6.251666667 6   7.138333333 8.829166667 8.270833333 8.441666667 8.354166667 7.994166667 9.233333333 6.921666667 4.675   4.1225  4.34    6.189166667 7.9575  8.05    5.0875  3.25    3.25    3.25    

Periodicity & Time Based Ticks

As of the writing of this issues ticks are int based this should be changed to DateTime by incrementing by a set TimeSpan called Periodcity in GeneralSettings there is more to this issue than meets the eye because the change is systemic.

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.