STF discretionary spot Forex system development journal - futures io
futures io



STF discretionary spot Forex system development journal


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one bnichols with 249 posts (152 thanks)
    2. looks_two Big Mike with 17 posts (4 thanks)
    3. looks_3 Adamus with 14 posts (3 thanks)
    4. looks_4 NW27 with 6 posts (0 thanks)
      Best Posters
    1. looks_one sam028 with 4 thanks per post
    2. looks_two bnichols with 0.6 thanks per post
    3. looks_3 Big Mike with 0.2 thanks per post
    4. looks_4 Adamus with 0.2 thanks per post
    1. trending_up 39,524 views
    2. thumb_up 167 thanks given
    3. group 18 followers
    1. forum 292 posts
    2. attach_file 182 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

STF discretionary spot Forex system development journal

(login for full post details)
  #261 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Spot EURUSD trade based on 6e VPOC at 3337, CD divergence, entry at yesterday low

Divergence



Trade

Visit my futures io Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
How many bars have passed since daily high
ThinkOrSwim
Bookmap replay files
Platforms and Indicators
Order cumulation
TradeStation
NFP
TradeStation
What is your favorite indicator for algotrading ?
EasyLanguage Programming
 
 
(login for full post details)
  #262 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Golden Fib ratio 261% for 6e


Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #263 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received


6e cumulative delta trend line on Friday afternoon. Guess drinks are being served at the G20 conference later, or they started a long time ago and the 'crats have passed out--no disturbances.

Could be wrong about the booze. There is a difference between a meeting of left wing politicians and a meeting of right wing politicians. Right wings go to convention to drink, left wings to enjoy the company of a lady friend. Not that they don't engage in both, but each tries harder to disguise one or the other.


Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #264 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Spent a little time this weekend working with NT (strategy development, backtesting and forward testing in and out of band via market replay), in the process acquiring a new appreciation for BetterRenko bars, and doing more reading ("Mathematics of Financial Markets" by Eliott & Kopp). Now prepping for London open.

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #265 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

It was an active trading day (31 trades in EUR.USD, 2 in AUD.JPY), purely discretionary, ended well particularly after FOMC lent a little direction to the market.

I find short time frame discretionary trading when price is moving relatively fast easy to do but still somewhat unnerving. While I look at MACD, stochastics, S/R, bar formation and lately volume profile and cumulative delta, interpretation of short term bias and especially entry is pretty much intuitive. In hindsight discretionary trading usually feels more like a performance (like painting a picture or what I'd imagine pitching or hitting in baseball must be like) than a "regular 9-5 job", which for me used to involve a lot of conscious thought and drudging attention to technical minutiae, and I still never quite know for sure ahead of time whether I'm going to pull it off. If price action slows down I start to think about what I'm doing, which like thinking about what we're doing when learning to ride a bicycle tends to end badly.

Today I started out looking to go long EUR.USD based on what I perceived to be bullish sentiment in Europe but ended up short most of the time. I have far less of a problem these days accepting what price is actually doing (and hence likely to keep doing for a period of time) over preconceived notions of what it ought to do, which (changing my mind, essentially embracing a totally opposite point of view on the spur of the moment) used to involve fairly complicated mental gymnastics.

In any event the 2 figures below show today's cash trades in EUR.USD and AUD.JPY. At one point in the morning I switched to paper briefly after wrangling a long trade to breakeven when price went in the "wrong" direction, managing the trade my preference over taking a loss in a ranging market and in the mood. While there were a number of losing trades I ignore them (if small ), and at the end of the day profits were substantially higher than usual due primarily to the FOMC statement which caused prices to trend.

EUR.USD (31 trades shown on 200-tick chart)


AUD.JPY (2 trades)

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #266 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Winding down the week today ahead of family commitments tomorrow with a little scalping and a little philosophy, including research into flocking behaviour (especially 1D flocking) and an always-in model of trading that in a nutshell manages the average entry price in such a way to always take profits, never losses. Not the first to consider the latter but as with most things that seem to come naturally (i.e., it's how I dig myself out of holes I dig myself into, so why NOT develop a continuous digging model that avoids the P&L model altogether and the tiresome necessity of being right or wrong) prefer to abstract some of the concepts and form a few opinions of my own before struggling with others' 2 cents on the topic.

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #267 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Part 1. Preamble

I expanded the work with an NT strategy than depends on BetterRenko bars over the last few days to include out of band portfolio backtesting. Bugs in NT that have workarounds aside, it appears NT portfolio backtesting won't so far (i.e., as of version 7) display a cumulative P&L curve for the portfolio as a whole so was faced with porting the strategy to Multicharts, which doesn't have BetterRenko bars, or writing a separate program to display the aggregate P&L. As an aside, the interest in doing portfolio backtesting stems from the well known fact that diversification is a good thing and a strategy that is reasonably robust with respect to multiple instruments can take advantage that well known fact.

This post is to share a VS 2010 project that will aggregate cumulative P&L for multiple instruments.

The approach used in the program is based on interpolation by cubic spline so the first step is to minimize noise by smoothing raw cumulative profit data (cumulative profit recorded after each trade) for each instrument by accumulating cumulative profit for trades that are close to each other in time.

Cumulative profit noise arises for a number of reasons but in this case primarily because I chose to associate a profit datum with the entry time. When a single trade generates a number of orders each of which closes some time in the future the resulting time series reflects this by associating multiple cumulative profit values that can be widely varying with the same point in time. Using the exit time for each order as the datum reduces the noise to a large extent but the residual still has to be dealt with by the same means.

The bottom line is it's not how we record the change in cumulative profit but how we interpolate the outcome to sum a number of such series, since trades in a number of instruments are asynchronous even if the strategy is the same simply because price action among instruments is not the same. Even if the instruments are "uncorrelated" temporary correlations lead to spikes in cumulative profit.

The strategy displays some sensitivity to number of simultaneous orders placed in a given direction so to test the program in these preliminary results the number of orders in a given direction was restricted to 2 to deliberately impair strategy performance and lead to wider variation in cumulative profit. For the same reason a short, out of band time interval was used, limited to the period between 1 January 2013 and the present.

The next 2 installments of this post will illustrate some of the concepts using figures and detail program use.

The project is attached as well as data for 3 pairs used in the study.

Attached Files
Register to download File Type: zip PortfolioStrategyTradeSum.zip (387.3 KB, 13 views)
Register to download File Type: csv EURJPY.csv (5.6 KB, 4 views)
Register to download File Type: csv EURUSD.csv (1.9 KB, 4 views)
Register to download File Type: csv USDJPY.csv (11.9 KB, 4 views)
Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #268 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

Part 2 (of previous post)


Program Design Considerations

An updated version of the VS 2010 project to sum cumulative profit of a strategy (or strategies) applied to a portfolio of instruments is attached ("PortfolioStrategyTradeSum.zip", including executable & alglib library required to perform the spline) as well as sample data files ("SampleData_6SpotCurrencyPairs.zip") for testing.

The sample data was obtained by exporting NT strategy performance report Trades sheet to Excel for each instrument in the portfolio, converting cumulative profit to a common quote currency (in this case CDN), copying "Entry Time" and converted "Cumulative Profit" columns to a new sheet, converting Entry Time from ASCII time format to 4 or 5 decimal place Number format required by the summation/aggregation program and exporting the new sheet as a .CSV file for input into the program. Example input file format showing file header (instrument name) and comma-separated data/time and cumulative profit fields:

 
Code
EURJPY
41212.11568,-301.2565707
41212.24163,147.7531772
41213.75986,-191.8381689
41214.17133,-82.36500314
...
2 significant changes to the algorithm in the new version are as follows:

1. Previously when P&L values were time-binned (or "smoothed") prior to splining the value assigned to a given bin was the latest P&L value encountered, reasoning that last was more representative of the whole. In the new version the value assigned to each bin is the least P&L value that falls in the bin, reasoning that this approach is more conservative. The effect is shown for 3 pairs in Figure 1:

Figure 1: Raw cumulative profit data for a strategy applied to EUR.USD compared to data binned on last value and data binned on least value


The process of summation of individually splined cumulative profit data series is illustrated in Figure 2 for a 3 currency pair portfolio. Note that the left-hand-side axis applies to individual spline curves while the right-hand axis applies to the sum.

Figure 2: Splined cumulative profit summation


2. Edge effects occurring at the beginning and/or the end of the splined P&L curve for a given instrument have been reduced by setting the values of the splined data for times prior to actual data to zero and to the last actual data value of original data for times greater than present in original data before summing the splines. The effect on the summed (portfolio) cumulative profit for a 6 instrument portfolio is shown in Figure 3:

Figure 3: Edge effect of truncating individual splines prior to summation (6 instrument portfolio)


Program Use

To use the program the attached .Zip file must be downloaded and decompressed into a folder of the user's choice. At this point the project solution can be opened in VS 2010, code viewed or changes made and the program recompiled as desired.

To run the program standalone, run <path to unzipped project>\PortfolioStrategyTradeSum\bin\Debug\PortfolioStrategyTradeSum.exe

The opening window is shown in Figure 4. At this point all the user can do is open an input file (cumulatiive profit data series for an individual instrument in the portfolio) via File>Open... or exit the program (File>Exit). [Exit must be confirmed to avoid accidentally closing the app.]

Figure 4: Application Initial GUI



As suggested in Figure 5 cumulative profit files for each instrument in the portfolio are loaded one-by-one by repeatedly clicking File>Open and selecting the appropriate input file (e.g., each of the 6 sample input files attached in turn) until data for all instruments has been loaded.

Figure 5: Loading instrument data


After data has loaded some stats for the instrument are shown on a status line at the bottom of the GUI (Figure 6)

Figure 6: Status line stats


When data for 2 or more instruments has been loaded the "Process" menu item will be enabled. The "Process" function will permit the user to repeatedly perform 1 of 3 tasks as indicated in Figure 7:

1. Save the aggregated (portfolio) cumulative profit to a disk file as a .CSV file (click "P and L Sum" menu item)
2. Save smoothed (binned) cumulative profit data for a component instrument (i.e., data just prior to being splined and before summation)
3. Save splined cumulative data for a component instrument (i.e., data after binning and being splined, but before summation)

Figure 7: Saving results to disk (including intermediate result for QA purposes & debuggiing).


Happy to answer any questions.

Attached Files
Register to download File Type: zip SampleData_6SpotCurrencyPairs.zip (8.1 KB, 11 views)
Register to download File Type: zip PortfolioStrategyTradeSum.zip (392.6 KB, 11 views)
Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #269 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received

As mentioned previously the advantage of running a mediocre strategy that may nevertheless (temporarily) have a somewhat positive expectancy on a portfolio of relatively uncorrelated instruments is that the approach may lessen the effect of individual component drawdown.

As an example of this, forward testing this week the stock NT strategy "SampleMACrossOver" optimized on individual portfolio components over the last few months of data for 6 spot currency pairs today resulted in a transient gain of over CDN $6000 when the market shunned news about the Italian election, whereupon price snapped out a consolidation phase and went looking for a new value area in all 6 currencies. In general mediocre strategies perform well when price is trending and poorly during chop.

Figure 1 shows the forward test underway on paper since last night, which for 1 contract traded per pair in real life might require margin somewhat in excess of $12,000 (minimum account size before losses).

Figure 1: NT portfolio forward test

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #270 (permalink)
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 460 received


For @dakine

Visit my futures io Trade Journal Started this thread Reply With Quote


futures io Trading Community Trading Journals > STF discretionary spot Forex system development journal


Last Updated on May 7, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts