StockFetcher Forums · View by Author: Kevin_in_GA (3,566 messages) ·  [ Display By: Date / Subject ]<< 1 2 3 4 5 ... 357 >> 
Filter Exchange · PORTFOLIO SELECTION AND MANAGEMENT USING RISK/REWARD RATIOS
Kevin_in_GA
msg #128312
5/4/2016 2:47:04 PM

Thanks for pointing this out - do you happen to know what his timing strategy is? Obviously it is going to be similar to this thread's approach so I'd love to be able to compare and crank out a SF filter for it.

Stock Picks and Trading · Shills Swing N Daily
Kevin_in_GA
msg #128265
5/1/2016 11:14:28 AM

www.prodigiorts.com


Filter Exchange · CUSTOM BOLLINGER BANDS FOR USER-DEFINED VARIABLES
Kevin_in_GA
msg #128214
4/28/2016 8:11:10 PM

Or maybe just modify the existing BB code to accept inputs other than the default close?

Now it would be

draw Bollinger Bands(close, 20, 2) for normal plot on price
or
draw Bollinger Bands(ratio, 20,2) on plot ratio
or
ratio above Upper Bollinger Band(ratio, 20,2)

That would be very helpful in filter development.

Kevin

Filter Exchange · CUSTOM BOLLINGER BANDS FOR USER-DEFINED VARIABLES
Kevin_in_GA
msg #128157
4/26/2016 1:53:36 PM

Another request - similar to the custom linear regression indicators would it be possible to get custom Bollinger bands for user-defined variables? While this can be done using multiple lines of code, it would be much easier if it could be coded into an indicator.

Example -

set{ratio, ind(IWM,close) / ind(SPY,close)}

now I want to look at the currently offered Bollinger Band Indicators for this - maybe something like

CUBB(ratio, days, #sd) - Custom Upper Bollinger Band
CLBB(ratio, days, #sd) - Custom Lower Bollinger Band
CBBOsc(ratio, days, #sd) - Custom Bollinger Band Oscillator
CBBWidth(ratio, days, #sd) - Custom Bollinger Band width

where ratio can be any previously defined user variable.

Please let me know if this can be added.

Kevin



General Discussion · Can Someone Answer This
Kevin_in_GA
msg #128047
4/18/2016 4:49:33 PM

Consider this: If you own a $100 stock and it gains 2% for 5 days in a row it is worth $110.40 and you profit $10.40. But if you short the same stock and it makes exact the same move in the opposite direction you gain only $9.61.

Or you have lost that amount by thinking it was going long. I think it is important to understand the market trend as well - no one has really done all that well shorting stocks over the last 5 years as the Fed has relentlessly pushed the market upwards. Now that the Fed has backed off it might be a good time to think short.

Or consider a market neutral strategy - equal weight long and short. I have always liked the statistical rigor associated with pair trades and would suggest reviewing that as a possible strategy. The challenge then becomes finding the right pairs ...

General Discussion · You want to help??
Kevin_in_GA
msg #127993
4/15/2016 9:16:12 AM

There are multiple lines within the standard KST:

KST Daily SMA
KST Monthly SMA
KST Intermediate SMA
KST Intermediate EMA
KST Long EMA
KST Weekly EMA

Which ones were you considering?

Filter Exchange · SF FILTER FOR PAIR TRADES
Kevin_in_GA
msg #127871
4/6/2016 10:29:29 PM

I haven' really posted any new filters in a while, and thought that for those who are interested in pair trades this might be helpful. I typically use a 14 day BB approach on the pair ratio, with entries above or below the BB(14,2) bands. Exit is on the cross back above/below the center line. You can adjust the trade size, look back period, and entry exit points to suit your own style.

Kevin

Fetcher[
SYMLIST(AOS,AZZ)

/*CALCULATE THE PAIR RATIO*/
SET{RATIO, IND(AOS,CLOSE) / IND(AZZ,CLOSE)}

/*DETERMINE THE 14 DAY MOVING AVERAGE FOR THE RATIO*/
SET{RATIOMA14, CMA(RATIO,14)}

/*DETERMINE THE PERCENT ABOVE/BELOW THE MA(14) FOR THE RATIO*/
SET{RATIOPCT1, RATIO / RATIOMA14}
SET{RATIOPCT2, RATIOPCT1 - 1}
SET{RATIOPCT, RATIOPCT2 * 100}

/*DETERMINE THE 14 DAY ZSCORE FOR THE RATIO*/
SET{RATIOSTD14, CSTDDEV(RATIO,14)}
SET{RATIO2STD, 2 * RATIOSTD14}
SET{RATIOUPPERBB, RATIOMA14 + RATIO2STD}
SET{RATIOLOWERBB, RATIOMA14 - RATIO2STD}
SET{RATIODIFF14, RATIO - RATIOMA14}
SET{RATIOZSCORE, RATIODIFF14 / RATIOSTD14}

/*DETERMINE DIRECTION OF PAIR TRADE AND THE NUMBER OF SHARES TO BE BOUGHT OR SOLD*/
SET{BELOWLBB, COUNT(RATIOZSCORE BELOW -2,1)}
SET{ABOVEUBB, COUNT(RATIOZSCORE ABOVE 2,1)}

SET{AOSSHARES1, 10000 / IND(AOS,CLOSE)}
SET{AOSSHARES, ROUND(AOSSHARES1, 0)}
SET{AOSLONG, BELOWLBB * AOSSHARES}
SET{AOSSHORT, ABOVEUBB * AOSSHARES}

SET{AZZSHARES1, 10000 / IND(AZZ,CLOSE)}
SET{AZZSHARES, ROUND(AZZSHARES1, 0)}
SET{AZZLONG, ABOVEUBB * AZZSHARES}
SET{AZZSHORT, BELOWLBB * AZZSHARES}

/*FORMAT FILTER COLUMN OUTPUT*/
ADD COLUMN RATIO {RATIO}
ADD COLUMN RATIOMA14
ADD COLUMN RATIOZSCORE {RATIO Z-SCORE}
ADD COLUMN RATIOPCT {PERCENT AWAY FROM MEAN}
ADD COLUMN SEPARATOR
ADD COLUMN AOSLONG {AOS - SHARES LONG}
ADD COLUMN AZZSHORT {AZZ - SHARES SHORT}
ADD COLUMN SEPARATOR
ADD COLUMN AOSSHORT {AOS - SHARES SHORT}
ADD COLUMN AZZLONG {AZZ - SHARES LONG}

/*DRAW RATIO PLOT AND ZSCORE*/
DRAW RATIO ON PLOT RATIOMA14
DRAW RATIOUPPERBB ON PLOT RATIOMA14
DRAW RATIOLOWERBB ON PLOT RATIOMA14

PLOTTYPE{RATIOZSCORE, ZEROBAR}
DRAW RATIOZSCORE LINE AT 2
DRAW RATIOZSCORE LINE AT -2
DRAW RATIOZSCORE LINE AT 0

CHART-TIME IS 6 MONTHS
]



Filter Exchange · CUSTOM LINEAR REGRESSION INDICATORS
Kevin_in_GA
msg #127831
4/4/2016 8:50:45 AM

No - those would be fine. Hopefully these can look back as far as 252 days?

Filter Exchange · Learning BOOLEAN for SF ... link?
Kevin_in_GA
msg #127818
4/3/2016 5:58:14 PM

The basic idea is to create two (or more) user-defined variables - let's say your two conditions are that the close price must be above the 20 day moving average and the rsi(2) must be below 5.

Now this is a really simple one since we could just write two filter statements and not get fancy, but here is a way to construct the Boolean versions:

set{variable1, count(close above ma(20),1)}
set{variable2, count(rsi(2) below 5,1)}
set{Boolean_AND, variable1 * variable2} - this returns a value of 1 only if both conditions are true
set{Boolean_OR, variable1 + variable2} - this returns a value of 1 if either condition is true

As to the filter which color-coded options - it might have been this one from me a while back:
Fetcher[
set{pp_10, CMA(pp,10) 1 day ago}
set{r_10, CMA(r1,10) 1 day ago}
set{s_10, CMA(s1,10) 1 day ago}

set{BUY, count(close closes above pp_10,1)}
set{SELL, count(close closes below r_10,1)}
set{WAIT, BUY * SELL}


draw WAIT
draw SELL on plot WAIT
draw BUY on plot WAIT

draw pp_10 on plot price
draw r_10 on plot price
draw s_10 on plot price

symlist(spy,qqqq,dia,gld,iwm,slv)

add column BUY
add column SELL
add column pp_10
add column r_10
add column s_10
]



Filter Exchange · CUSTOM LINEAR REGRESSION INDICATORS
Kevin_in_GA
msg #127799
4/2/2016 10:40:37 AM

SF Crew:

How about being able to use the current linear regression indicators on user-defined functions, similar to what we can currently do with custom moving averages? Would this be possible to code and make available to the user community?

Kevin

StockFetcher Forums ·  · << 1 2 3 4 5 ... 357 >>

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus