Modification Ideas

  • Allow storage of variables used versus summary output received, so you can compare trials easier.
    • Allow all trials with certain steps (increments) to be calculated to find optimality.
    • Use solver instead?
    • Is brute force optimality correct way to deal, or is it fake optimality because there is a mathematic way to find the optimality?
  • Allow different trading strategies to be used, such as trading up and down based upon MACD trending.
    • Allow variance of days, instead of hard coded two or three days.
  • Allow same or different data to be used.
    • Allow storage of past ‘random’ data. Can give timestamp for worksheet name.
  • Allow manual turn off/ permanent setting of the number of replications. Useful if you want to use the same number of replications many times in a row or for automation / solver use.
  • Take trading prices ( ~$5 ) into consideration
  • :-) Allow more than 1000 trials.
  • :-) Add ‘ending total-asset value’ to ‘Summary’ sheet. I need to know all my assets ( cash + stock).
    • Answer: Look at “Cumulative gain / loss” on ‘Summary’ page
  • :-) Fix, add-to, and improve comments in code
  • Keep speed of runs / replications at a minimum
    • 100 records = 11 seconds
    • 1000 records = 104 seconds
  • Reference all data by cell and range names, instead of by .offsets, which assume data is in certain locations. Assuming data is in certain explicit location means that modification of the worksheet cells (adding a new row) would break much functionality.
    • At same time, loops that can quickly and with clean code go through explicitly located data is nice and convenient for computer and coder... find a balance.
  • Two most important summary fields highlighted
  • Buttons on pages; where useful for repetitive runs.

Main Modification Choice

Allow a choice of modular trading strategies to the user

Functionality Needs

Let them easily choose or set which strategy to use

  1. Set manually at first for implementation and proof of concept ease.
  2. Create a dialog box listing all strategies for user to choose from.
    • Allow manual turn-off / permanent setting of strategy.
    • Useful if user is using one strategy over and over, so they don’t have to choose it each time, or if they intend to automate run with a goal-seeking strategy like solver.

Allow modularity of new trading strategies

  1. Reference built-in functions that are pre-defined at first.
    • Pre-defined as in constant variables or fields in a worksheet. The name of the trading strategy functions.
  2. Easy adding of users own coded strategies, or existing strategies of other coders.
    • Ideal: List of official strategies if pointed to web-hosted XML of registered strategies, where excel app lists them and allows user to choose one. Excel downloads strategy as file and uses function in downloaded file.

Implementation Planning

Strategies likely implemented as functions versus ....

  • Subs that return boolean ( trade, don’t trade)
  • Subs that actually return the number of trades to buy, or, in a different function, to sell.

Multiple strategies

  • Possibly allow multiple strategies to be run and/or work together
  • Hard to do, out of scope
  • DO IT LATER

Implementation Analysis

Implemented in one of three ways

Existing If logic

Use existing if logic in each days cell in the ‘Model’ worksheet.

  • = If( logical test, value if true, value if false )
  • = If( sell(), howManyToSell() )

Positives and Negatives

4 positives, 4 negatives, 0 rating

Possibly more modularized. Forced modularity. Confusing to future coders/users. Possibly blocks certain kinds of trading strategies from being implemented. For example, strategies where you need to change data in the cell. Easy for me to implemented. Does not meld with future features. Faster speed. Semi good aesthetic design.

Function Call

Use function call directly in each days cell.

  • = howManyToBuy()

Positives and Negatives

6 positives, 2 negatives, 4 rating

Possibly modularized, but all within function. Modularization up to coder of strategy. Less confusing to coders/users. Possibly blocks trading strategies, example: code creates calculation in cells, changes something. Easy for me to implement. Melds easier to future feature additions (adding other user’s strategies). Medium speed. Aesthetic design.

VBA run-time code

Use VDA runtime code to decide what to trade,

  • no cell(?) calculation of decision.

Positives and Negatives

3 positives, 5 negatives, -2 rating

Just as modularized as above, all within a function. Modularization up to coder of strategy. More confusing to coders/users. All trading strategies possible, can change data anywhere, derive what is needed on spreadsheets not just in code. Hard for me to implement. Melds with future features. Possible slower speed... stuff in cells seems to be faster than VBA. No cell use on just certain field inside of an otherwise cell-calculation driven worksheet. Is not programatically aesthetic.

Modular Trading Strategies Ideas

Up / Down, trade % of stock

Existing, but needs to be modularized.

  • After 2 days up/down, trade % of stock
  • After 3 days up/down, trade % of stock.

Method can be inadequate because by the time it buys or sells, the market keeps moving and money is often lost by missed opportunities. I found the optimal settings for this to be to just buy it all and keep it, anyone can do that if you already know your stock.

Set how many days Up / Down until trade

Existing, except user can set how many days up/down until trade. Not locked to two- or three-day runs. This method can possibly look for longer, larger trends, or shorter trends.

My hopes are that this may fill in slightly for longer or shorter trends, but it will still likely be inadequate. Good for messing around with. Also, like the one above, there is a shortcoming in that it only buys on percent of stocked owned, not cash available... see next strategy.

Trade % of CASH when buying

Existing except the strategy trades on slightly different buy rules.

  • trades percent of CASH when buying
  • trades percent of stock when selling

Hopefully this will allow more assets to get into holding shares, and not siting idle. More money is made when more funds are in the stocks (as long as they go up :-) )

MACD trending

Totally different trading scheme. Trade up/down based on MACD trending. Moving Average Convergence Divergence, involves using multiple Exponential fitting curves to longer-term. There is a slow and fast curve, and we can visualize movement trends of the stock price over weeks, days, or months at a time. I am interested in mapping when the slow and fast line meet, how violently they meet, etc. This is a well-known and used, Technical Analysis (TA) method, as most strategies on this system will be.

This is my most hopeful trading strategy, but it will take time to code, as I am still grasping the mathematics behind it all.... and I thought I would never use trigonometry and calculus! There are example excel sheets of MACD trending on http://www.gummy-stuff.org that I may be able to study and utilize.

Other research that could turn into strategies

Technical analysis info from http://clearstation.etrade.com

MACD moving average long-term shows trending and significant changes in behavior. EMA RS rating when fast and low signal line cross it shows trend up for them. Exponential moving average. Percentile rating of stock.

EMA - Exponential moving average, RS rating, percentile rating of stock amongst all stocks [...]. Oscilators compares current price to range stock trades into determine direction of future prices. [...] identify turning points for short term oversold or over buy can help determine by in or sell points by saying that it trends outside the long

 
finance/stockproject/plan_implement_document.txt · Last modified: 10.23.2007 07:09 by 69.140.134.101
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki