Registered User Joined: 10/7/2004 Posts: 1,006
|
Need some expertise help, I’m having difficulty writing the following Risk Reward Ratio PCF. I’ll provide a hypothetical example.
Target Price (C*1.1): 19.82 Entry Price C : 18.02 Stop Loss (C*.97) 17.48
The formula for Risk Reward Ratio: (Entry Price C) – (Target Price C*1.1) / (Entry Price C) –(Stop Loss C*.97) (18.02) – (19.82) / (18.02-17.48) (1.8) / (.54) = 3.33
The risk reward ratio is 3.33 to 1
How do I write the PCF to get the number 3.33, I have written it in various ways including using the ABS function, value does not come out to 3.33
Thanks Winnie.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
Maybe I'm missing something, but there is no way to variably reference an entry price in a PCF. If you're using C, remember that you're using the current price of the stock (latest downloaded price). Your whole formula is based on that entry price.
- Doug Teaching Online!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Winnie, You can get the result to equal 3.33 by using the following form:
ABS(C - C * 1.1) / ABS(C - C * .97)
But I'm not sure I understand why this would be useful. You will get the same result for every stock each day because the "Target Price", "Entry Price" and "Stop Loss" are all fixed mutliples of the current price.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Hi Doug,
That's correct, base the entry price on C, there should be a way to write this formula based on C???, or am I missing something.
Thanks Winnie
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Hi Bruce and Doug,
Thanks, I understand Bruce, that will be the minimum RR criteria, will use it as a sort tool, if it doesn't meet the criteria it will not be considered. Maybe you know of a better way to do this?
Thanks Winnie
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Hi Bruce,
I understand your comment now, all stocks are 3.33 with this PCF. Is there another way to do this? I'm sure you understand my question where the minimum RR is 3, at present I use a spreadsheet to do this, it would be nice if this could be done in TC2005.
Thanks Winnie
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Hi Bruce,
What about using MAXH5 for target price and MINL5 for stop loss or using support and resistant values. Then again one has to define the support and resistant
It was a thought
Thanks Winnie
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
This is the issue I was addressing in my post above. Because you can't variably address a particular price for particular stocks in a PCF, you run into the problem Bruce brought up. Same result for each stock each day. Based on C, the formula will always be based on the latest downloaded price for whatever stock you're on
- Doug Teaching Online!
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
I believe a way around the fixed multiple issue would be;
Up target = (L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H + (H + L) / 2
Down tgt = (L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H - (H + L) / 2
Stoploss H - ((MAXH3 - MINL3) * 0.5)
Long Trades (UpTgt - C) / (C- Stoploss)
Short Trades (C - Down Target) / (Stop loss - C)
The only other variable that has to be inputted is the abs function.
What do you guys think?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Quiktdr, I've substituted Up Target, Down Target and Stoploss into the Long Trades and Short Trades formulas. When this is done with or without the ABS() function, it results in ratios that are no longer always 3.33. That said, I couldn't say if the result is what you want or if it would be useful. The trainers cannot give settings, interpretation or investment advice.
You might want to try out the resulting formulas yourself. If they work, great. If they don't, you might want to post your formulas along with both the expected and actual results. At that point, it might be possible to figure out why the formula is returning results that do not meet your expectations.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Bruce,
Where would you put the abs functions?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It doesn't really make much difference if you put it around each section or the entire formula:
Long Trades ABS(UpTgt - C) / ABS(C- Stoploss)
Short Trades ABS(C - Down Target) / ABS(Stop loss - C)
Should produce the same results as:
Long Trades ABS((UpTgt - C) / (C- Stoploss))
Short Trades ABS((C - Down Target) / (Stop loss - C))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Bruce,
I wrote this for long trades but now it doesn't work since I put in ABS. What did I do wrong?
ABS(L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H + (H + L) / 2 -C) / (C - ABS( H - ((MAXH3 - MINL3) * 0.5)))
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I would suspect it is a parentheses issue since you don't appear to have the same number of opening and closing parentheses. Please try the following instead (I'm not saying they are what you want, just that they should calculate):
Long Trades: ABS(((L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H + (H + L) / 2 - C) / (C- (H - ((MAXH3 - MINL3) * .5))))
Short Trades: ABS((C - ((L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H - (H + L) / 2)) / (H - ((MAXH3 - MINL3) * .5) - C))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/12/2006 Posts: 296
|
Before I start "playing around" with this very interesting PCF, thought I'd ask how it was working.
Thanx
|
|
Registered User Joined: 10/26/2006 Posts: 56
|
Bruce:
"Long Trades: ABS(((L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H + (H + L) / 2 - C) / (C- (H - ((MAXH3 - MINL3) * .5))))
Short Trades: ABS((C - ((L >= C1) * C1 + (L < C1) * L - (H < C1) * C1 - (H >= C1) * H - (H + L) / 2)) / (H - ((MAXH3 - MINL3) * .5) - C)) "
We put the last posts' pcfs to work. The Long Trade pcf seemed to be OK. The results are in the 1-10 or 40.
But for the short trade pcf, the ratio are in the hundreds or thousands.
Please help, thanks,
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
startup3665, I didn't develop these formulas. All I've done is attempt to correct obvious errors in the syntax of the formulas as originally presented. The trainers cannot give settings, interpretation or investment advice, so I can't just adjust the formulas to produce values in a similar range without being told what they are supposed to be finding in the first place.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/26/2006 Posts: 56
|
Thanks, Bruce: Is there a pcf video made for the reward/ risk ratio? We tried to search the web, however, this post string is the closest thing. Best Thanksgiving.
|
|
Registered User Joined: 10/26/2006 Posts: 56
|
Or can you point us to a risk/ reawrd pcf post? thanks a mile.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
startup3665, If you define a risk/reward strategy, I might be able to write a formula, but it depends on the particular strategy. I don't have a topic besides this one to reference.
To me at least, it seems that the formula starting this topic is designed to be calculated based on a specific purchase price and with an adjustable stop loss. Personal Criteria Formulas don't have a way to reference an inputed price and despite significant discussion and work on it, automated trailing stops are not practical as PCFs in TeleChart.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/12/2006 Posts: 296
|
startup3665.......I don't think this is worth further effort to pursue. Also, the originaor did not post a response to my inquiry.
However, I came across something neat in wandering internet. Found a blog entry on ATR. I made a custom formula (see video) and placed it as an indicator in lower window. The extreme lows/highs, when combined with another indicator (play around with a few to find one you like, including the Worden trio), are pretty good helping to pull the trigger. don't try to cath the very bottoms/tops - be grateful when you can catch most of the middle. copy/paste formula into a pcf and add as a custom indicator
Another Kind of ATR14 Smoothing Avg: 5 ExponentialOFF WHITE COLOR
(( (C - C1) - .001 ) / ( ABS ( (C - C1) - .001) ) )) + (((C1 - C2) - .001 ) / ( ABS ((C1 - C2) - .001)))) + (((C2 - C3) - .001 ) / ( ABS ((C2 - C3) - .001)))) + (((C3 - C4) - .001 ) / ( ABS ((C3 - C4) - .001)))) + (((C4 - C5) - .001 ) / ( ABS ((C4 - C5) - .001)))) + (((C5 - C6) - .001 ) / ( ABS ((C5 - C6) - .001)))) + (((C6 - C7) - .001 ) / ( ABS ((C6 - C7) - .001)))) + (((C7 - C8) - .001 ) / ( ABS ((C7 - C8) - .001)))) + (((C8 - C9) - .001 ) / ( ABS ((C8 - C9) - .001)))) + (((C9 - C10) - .001 ) / ( ABS ((C9 - C10) - .001)))) + (((C10 - C11) - .001) / (ABS((C10 - C11) - .001)))) + (((C11 - C12) - .001) / (ABS((C11 - C12) - .001)))) + (((C12 - C13) - .001) / (ABS((C12 - C13) - .001)))) + (((C13 - C14) - .001) / (ABS((C13 - C14) - .001)))) + (((C14 - C15) - .001) / (ABS((C14 - C15) - .001)))) + (((C15 - C16) - .001) / (ABS((C15 - C16) - .001)))) + (((C16 - C17) - .001) / (ABS((C16 - C17) - .001)))) + (((C17 - C18) - .001) / (ABS((C17 - C18) - .001)))) + (((C18 - C19) - .001) / (ABS((C18 - C19) - .001))))
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (kokoda) Another Kind of ATR14 Smoothing Avg: 5 ExponentialOFF WHITE COLOR
(( (C - C1) - .001 ) / ( ABS ( (C - C1) - .001) ) )) + (((C1 - C2) - .001 ) / ( ABS ((C1 - C2) - .001)))) + (((C2 - C3) - .001 ) / ( ABS ((C2 - C3) - .001)))) + (((C3 - C4) - .001 ) / ( ABS ((C3 - C4) - .001)))) + (((C4 - C5) - .001 ) / ( ABS ((C4 - C5) - .001)))) + (((C5 - C6) - .001 ) / ( ABS ((C5 - C6) - .001)))) + (((C6 - C7) - .001 ) / ( ABS ((C6 - C7) - .001)))) + (((C7 - C8) - .001 ) / ( ABS ((C7 - C8) - .001)))) + (((C8 - C9) - .001 ) / ( ABS ((C8 - C9) - .001)))) + (((C9 - C10) - .001 ) / ( ABS ((C9 - C10) - .001)))) + (((C10 - C11) - .001) / (ABS((C10 - C11) - .001)))) + (((C11 - C12) - .001) / (ABS((C11 - C12) - .001)))) + (((C12 - C13) - .001) / (ABS((C12 - C13) - .001)))) + (((C13 - C14) - .001) / (ABS((C13 - C14) - .001)))) + (((C14 - C15) - .001) / (ABS((C14 - C15) - .001)))) + (((C15 - C16) - .001) / (ABS((C15 - C16) - .001)))) + (((C16 - C17) - .001) / (ABS((C16 - C17) - .001)))) + (((C17 - C18) - .001) / (ABS((C17 - C18) - .001)))) + (((C18 - C19) - .001) / (ABS((C18 - C19) - .001))))
The PCF has nothing to do with volatility as measured by ATR. It is just a complicated way of counting the up days minus the days which are not up out of the most recent 19 days.
The PCF:
SGN(C0-C1) +SGN(C1-C2) +SGN(C2-C3) +SGN(C3-C4) +SGN(C4-C5) +SGN(C5-C6) +SGN(C6-C7) +SGN(C7-C8) +SGN(C8-C9) +SGN(C9-C10) +SGN(C10-C11) +SGN(C11-C12) +SGN(C12-C13) +SGN(C13-C14) +SGN(C14-C15)+SGN(C15-C16)+SGN(C16-C17)+SGN(C17-C18)+SGN(C18-C19)
counts the number of up days minus the number of down days out of the most recent 19 days. If you subtract 0.001 from each argument of the SGNs, it will return the same value as the quoted PCF.
"Another Kind of ATR14" is a misnomer for it with an EMA5 applied.
Thanks, Jim Murphy
|
|
Registered User Joined: 1/12/2006 Posts: 296
|
Hi Jim
Everything you state is probably true. The info came from the below listed web address. The originator's name is Murty Rompali, he named it, and it appeared to me that he was/is a member of TC with considerable knowledge of PCF'S.
(URL removed by Moderator)
All that happened was I found something by accident that also appeared interesting. I then decided to try it out. Anyway, I did use this as a custom indicator and appears to perform in a manner very useful to me.
Because I had several forum discussions with startup3665, including this topic, I forwarded this info.
Ray
|
|
Registered User Joined: 10/26/2006 Posts: 56
|
Gentlemen:
Happy Thanksgiving for all, first and foremost.
Great postings. We just had a seafood meal, so fulfilled (full and filled).
We were thinking more of a preventive/ preemptive/ screening approaches before we enter an investment.
Today's price: open/ close, high/ low, average/ median/ mode,.... can all be used for screening purposes.
Then assuming a 'normal' distribution, assuming it because each stock/ option/ ETF,... has its own characteristics distribution across time, price or volume range,.... We have yet to conduct a study on this area.
Therefore, a two to three standard deviations (sd) + or - from today's price will cover at least 95.4% to 99.7% of the normal-assumed distribution asset's area.
We saw there are a few channel indexes used in TC such as envelop channel, we don't know what is the calc behind these channels. But we think it may be similar to sd.
The channels upper/ lower limits can serve another indexes in addition to the sd.
Then it wil be:
(Channle upper limit or 3sd above - Today price)/ (today price - lower limit or 3sd below)
We will compute this ratio for the past 5, 10, 15, 20, 30,.... days up to 3, 6, 9 months, up to 1, 2, 3, 4, 5 years marks.
Or even better, if we compute this ratio for everyday for the past 10, 20, 30,... years, taking into consideration from KoKoDa and Jim's insights/ inputs.
Then we contruct a reward/ risk ratio line just like the price, MA, TSV, MS, ADX,... for the past 30 years for easy visualization/ interpretation of the data just like our professor: edward tufte taught/ wrote it.
Also, each point of purchase is a reward/ ratio ratio made, they can be thought of as a candlestick just like a struck price itself.
Ever since we signed onto TC a month ago, we have created/ edited many pcfs to make lots of statistics day to day, but how to save them and make these calc results into a graphic/ chart so we can see them in a longer term trending perspective? This is hitting two or three birds in one stone. Remains a challenge.
We are above-average statistical tinkers or thinkers, but are below-3sd-average programmers. Hope everyone in this forum chips in.
In summary, the questions we have are: 1) How many different channel indexes are being used in TC? how are they calculated? 2) Are there any simple ways to further construct this reward/ risk ratios into a graphic candlestick representation? over a longer-than-daily time periods?
The best index will be just like prices: candlesticks, bar charts works best. 3) How to compute a few pcfs first to do a few ratios first?
Reward/ risk ratios are very critical in the preventive overall assessment of asset investments and are often ignored by most people. It is like the 'cost benefit analysis(CBA)' routinely required by most government or civil projects or research grants applications. It has everything to do with setting up an exit strategy, well-defined and strictly-disciplined before our entry into an ever fast-moving, turbulent investment stream.
Hope this may trigger Worden to set up an reward/ risk ratio index just like the in-depth proprietary TSV, MS, BOP,..Instead of just focusing on the nitty-gritty specifics of zeroing down into price/ volume movement, a more comprehensive topographic overview of 'how much money we have to risk before making a dollar reward back in the market?' Many many users in this community will be benefited greatly.
Cheers,
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
You can plot any formula on a chart in TeleChart. We can also create more intricate plots in SnapSheets.
If you can clearly define risk and reward for me I will show you how to plot your idea in both programs.
- Craig Here to Help!
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (Quiktdr) Up target = (L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H+(H+L)/2
Down tgt = (L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H-(H+L)/2
Stoploss = H-(MAXH3-MINL3)*0.5
Long Trades (UpTgt-C)/(C-Stoploss)
Short Trades (C-DownTgt)/(Stoploss-C)
We will repeat the Risk Reward Ratio concepts for Longs and give the corresponding concepts for Shorts. Some additional comments on Risk Reward Ratios are included.
____________________
Definitions:
Median: (H+L)/2
True Range: (L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H
Range(3 bar): (MAXH3-MINL3)
Long:
Entry: Close
C
Target: Median + True Range
(H+L)/2+((L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H)
Stop: High - Range(3 bar)/2
H-(MAXH3-MINL3)/2
Risk Reward Ratio: (Target - Entry)/(Entry - Stop)
(((H+L)/2+((L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H))-C)/(C-(H-(MAXH3-MINL3)/2)+0.000001)
Short:
Entry: Close
C
Target: Median - True Range
(H+L)/2-((L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H)
Stop: Low + Range(3 bar)/2
L+(MAXH3-MINL3)/2
Risk Reward Ratio: (Entry - Target)/(Stop - Entry)
(C-((H+L)/2-((L>=C1)*C1+(L<C1)*L-(H<C1)*C1-(H>=C1)*H)))/((L+(MAXH3-MINL3)/2)-C+0.000001)
____________________
Risk Reward Ratio seems to always actually refer to the reward-to-risk ratio.
The 0.000001 in the denominators of the Ratios is to prevent division by zero.
The Reward, the numerator of the Risk Reward Ratio, is always nonnegative for both Longs and Shorts; but, the Risk, the denominator of the Risk Reward Ratio, is not. For Longs, a negative Risk means that at the close someone is willing to buy for more than the closing price. For Shorts, a negative Risk means that at the close someone is willing to sell for less than the closing price. It is suggested that the absolute value not be used in the Ratio in order that you can tell by negative values that the Stop has already been violated.
As you can see, the Risk Reward Ratio should not be formed in the case at hand. Ratios large in magnitude simply mean that the Close is very near the Stop.
There is a general use of the type of Risk Reward Ratio (Ratio) defined here:
Risk Reward Ratio = (Target - Entry)/(Entry - Stop)
for Longs. But, it must be associated with a Win Probability (Win). The Expected Gain (EGain) per unit risked is:
EGain = Win*Ratio - (1-Win)
and is the number of interest. From this, we see that increasing the Risk Reward Ratio is not necessarily benefical; it is a large (Win Probability)*(Risk Reward Ratio) that is desirable. In all of this, it is important to remember that Risk Reward Ratio is actually (Reward)/(Risk) and not the inverse.
As an added note, those familiar with the Kelly Criterion will recognize:
EGain/Ratio = Win - (1-Win)/Ratio
as the portion of ones Wealth to risk on each trade in order to maximize Expected Wealth as the number of trades increases without bounds. Most consider that quantity excessive.
Thanks, Jim Murphy
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
The concept of risk in the market is a complex one. There are all types of risk:
1) Knowledge (we can be our own worst enemy) 2) Diversification (too many eggs in one basket) 3) Asset correlation (see # 2 ) 4) Time-frame (daytrade, short-term, long-term) 5) Equity exposure ( see # 4 ) 6) Asset quality ( see #1 ) 7) Trading methods (see # 1 ) 8) Emotion ( see # 1 ) 9) Adaptation ( see # 1) 10) Market conditions ( see # 1)
These are just the ones I can think of off the top of my head.
-------------------------------------------------------------------------------------- Some tips that I have found useful:
1) Focus on how robust trading systems are. (not necessarily on perfect exit and entry)
2) Diversify your trading methods, timeframes, asset classes.
3) Steer equity towards successful systems and away from less-successful systems.Defined by how the are performing now. ( in the style of Kelly )
4) Handling equity, position sizing, and money management are probably more important than the trading system itself. ----------------------------------------------------------------------------------------------------
The way I see it. There is a set of market conditions. In order to make money we must trade that. It does not matter if housing is the weak/strong sector or technology is the weak/strong sector. We must try to exploit what is happening today.
Maybe I don't fully understand the concept but it seems to me very little would be gained from 30 years of statistics for risk/reward ratios.
One of the problems with risk/reward ratios. (as I see it)
We can always define risk. We cant define reward. (not with a guarantee )
Thanks diceman
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (diceman) One of the problems with risk/reward ratios. (as I see it)
We can always define risk. We cant define reward (not with a guarantee).
diceman,
There are different ways to determine Risk and Reward, usually depending on the Trading Strategy employed.
In the very restrictive present context, the Strategy:
1) Enter at the close. 2) Place a sell stop and a stop loss and execute which ever comes first.
is used. In this case:
Risk Reward Ratio = (Target - Entry)/(Entry - Stop)
for Longs:
Reward = Target - Entry
and:
Risk = Entry - Stop
Both Reward and Risk are easily determined. They can be closely realized with the stop orders for widely traded issues. The difficulty is in determining the Win Probability, or, equivalently, the Loss Probability. In this case, neither the Entry nor the Exit are random.
Your statement would apply, for example, to a Strategy where one Enters and applies a stoploss but the Exit Price given a Win is random. Then, Risk is easy but Reward and Win Probability are difficult. The Strategy:
1) Enter at the close. 2) Place a stoploss at 5% loss. 3) Exit at the close 10 days after entry if the stoploss has not been executed.
illustrates this case.
The Strategy:
1) Enter at the close. 2) Exit at the close 10 days after entry.
illustrates the case where Risk, Reward, and Win Probability are all difficult.
Thanks, Jim Murphy
|
|
Registered User Joined: 10/26/2006 Posts: 56
|
If we cannot measure them, we cannot manage them. Gents, most of the time in a real world, we found it is not statistics that is an issue, it is how best, how close/ precise we are able to measure things or end results.
'Beauty is only skin deep'. Used to work for a biotech firm that did dermatology in the beauty business to make people look younger. The clinical trials was a mess, little robust measurement of the end results in this beauty business ever exists. Again, it ain't statistics, it is measurement.
Despite all the measurement issues in the rr ratio, we saw simplicity and practical application of Mr. Murphy's approaches. It is doable for us to screen the odds/ candidates.
Our approaches of standard deviation is not robust enough, the regression one needs lots of further diligence.
Cheers,
|
|
Guest-1 |