[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Trade Against Technical Indicators?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 59
Thread images: 7

File: white_noise.png (253KB, 1679x1049px) Image search: [Google]
white_noise.png
253KB, 1679x1049px
So I basically programmed my own charting and statistical analysis tool (to make it quick: I have iMacros running collecting various realtime quotes and I feed them into R or Python which gives me full access to run my own statistical techniques and indicators).

Now, a question that is being stuck in my head is: when you take the really simple e.g. crossover (SMA / MACD / Stochastic) indicator-strategies, then they don't really make profit in the longer run. So why not use these inefficient trading strategies in reverse and therefore profit when the market moves against these really simple trading strategies (which it quite often does). You don't be greedy, make a quick buck on the contrary move (which goes against the indicator-signal), and then exit since e.g. when the market is trending then it tends to agree with the indicators. Does that make sense? Is there anyone here who has some experience/input on that? Google didn't really bring up anything useful.
>>
Put simply: e.g. MACD: when its signal passes from below the indicator through it and is then above the indicator this is usually a buy-signal, but often the market tends to move against this buy-signal and goes into the opposite direction for a limited time, before generally agreeing with the indicator, assuming the market is trending. Now why not use that quick move of the market into the "wrong" direction to make a leveraged buy-in (options) and be out after a short while before the market finally moves against you and with the indicator.
>>
R code looks strange.
>>
>>1143873
there are lots of ways to implement a continuously refreshing system, now I have a .csv-file for every major asset I am interested in with up-to 1second intraday data. But in an earlier attempt I had all in one .csv-file resulting in a (40,000x150) matrix and R still handled it flawlessly on a second basis, so I come to think that Python and R are actually almost equally good when it comes to handling big data, of course C++ is best, but I have no knowledge of it.

Any input on trading reverse indicator signals?
>>
>>1143850
b/c those moves are often so small that the price of the options won't change that much. and fees in and out will kill the trade.
>>
Just a few questions from someone who has no idea how to code.
Is it possible to test your strategy/program in real time without investing money?
Could you suggest some books/article I could read to get started. I'm really interested in automated systems.
>>
>>1143963
Yes it is possible and not too hard to implement. However, it costs money to have a feed of intraday (tick-) data that you can use to fill into your system. That is why I am running iMacros to collect realtime data from bank-derivative-sites and stock exchanges but ultimately I will have to move on to paying per month for a datafeed subscription. I collect the data myself for now because I am in the phase of developing/testing and don't want to pay for monthly subscription as of now, and the collection process only takes about 5 seconds for all the 150 assets I am watching.

Main advantage: once you fill data into Python or R for example you are completely free of doing whatever you want with it. You are not restricted to the limited toolbox of indicators provided to you by most broker trading applications. You could even run Artificial Intelligence, Pattern Recognition, MonteCarlo Simulations and GARCH-models intraday up and down as much as you like.

In order to test your strategy in real-time you would need to code all the necessary indicators you would like to use, then code a set of trading signals based on which you want to have entry/exit- signals etc., then backtest this strategy with the data you have. If you're interested in that you should first off check out Quantopian (its a popular quant competition/developing site where people use Python to implement their trading systems and then can backtest them for free with tons of end-of-day data provided, while for intraday data you have to pay there too).

There are some good Entry-books (not a specific order):

(1) Chan - Algorithmic Trading
(2) Chan - Quantitative Trading
(3) Georgakopoulos - Quantitative Trading with R
(4) Kaufman - Trading Systems and Methods

Just look into what you want, search for Algorithmic Trading, Automated Trading Systems, High Frequency Trading, Quant-Finance in R and Python ... most importantly of course: make yourself familiar with coding (R, Python or C++).
>>
>>1143963
>>1144035
I don't know what you mean exactly by "test in real time without money", but can also imagine s.th. like this:

after you're done coding your strategy and you get a continuous feed of end-of-day or intraday data (whatever you prefer), you just code an additional "paper-trading program", e.g. you say you have initial capital of K$ and based on your signals you invest x*K$ or whatever and also implement some slippage and transaction fees, then let that system run throughout the day in real-time as you're watching the markets and receiving your realtime quotes, so you can see directly every second what your trading system is doing and how your system performs. Of course if you like it you can put real money in it and let it run, but you would need for example a Python API with Interactive Brokers for that as far as I know, because they have to allow your program to place trades on your behalf and not all brokers give you that opportunity to my knowledge. So you would need to look into that, professionally it goes into having a DMA = Direct Market Access, that's how Hedge Funds do it.
>>
>>1143902
good point, this was also my biggest concern. But before I run backtests on strategies like that I just wanted to check whether someone had experience with it.
>>
>>1144035
>>1144046
Thank you.
>>
You can better take a course and use Elliot wave along witht he 3 indicators we use to make use amounts of money :) I made 420% parttime with a couple of hours a month in 2015
>>
>>1144061
one more thing: years ago I started off backtesting and checking out indicators with a system called ProRealTime (www[]prorealtime[]com/en/), they have pretty much all you need, all major asset classes with end-of-day data for free, over 100 technical indicators, you can program your own indicators (proprietary language though, not Python etc.), and also do backtesting very easy. From all the trading programs I stumbled across over the years, ProRealTime and TradeStation are definitely the two that impressed me the most. So if you don't want to start from scratch with R or Python or C++ but want to have it a little easier and pretty much everything you need at hand (except intraday data) then that's probably the way to start off getting familiar with stuff.
>>
>>1144067
I read a lot about Elliot Waves back in the day but still keep thinking that it has an esoteric touch to it (sort of like Fibonacci retracements) and it just feels subjective and not like something you could implement as hard rules in code. I am curious. Could you explain more about your system?
>>
The reason this isn't done is because of the massive upfront loss. Also, you will have a lot of tail risk and even more losses. You will be trying to play people doing short and long positions at the same time which is just stupid.
>>
>>1144088
good input, thank you.
>>
>>1144115
No problem. Good luck though. It's out of the box thinking that gets you in the green.
>>
Just an idea.
We have stocks and commodities with a strong correlation.
So major movement in one price should also affect the other price.

So first of all you could monitor both prices for indicators. As soon as you have a signal/movement in one price you could bet on the other.

For example Dow Jones vs. S&P 500.
>>
>>1143846
i would love to share my packtpub.com access with you in exchange of some skill trading. are you on skype or something ?
>>
>>1143846
>Do the opposite of what X says
I like it.
>>
You want to be contrarian but not too much, reverse trading is risky this way
>>
>>1144158
That's actually quite an interesting idea, I never thought of applying correlation to indicators in that way, and it should be fairly straightforward to code too. Thank you, I will look into it.

>>1144169
sorry but I am probably not the right guy to ask about skill training, I don't feel quite confident with coding / trading myself yet, just think I have a ton of things to learn still despite all. You should look into books, there are also some very good blogs out there and you can look at some Python scripts on Quantopian written by others (some of them are quite advanced). I could share my R code with you but its tailored to work with the sources I use and especially with iMacros, so it wont be useful.

>>1144181
You are correct, I also thought about the philosophy behind this approach: if it really would be profitable to trade against indicators then the indicators wouldn't have been developed that way with the specific signals. So there is only a small profit margin and risk involved, you are correct. I tend to think that it wont be profitable but wanted to hear opinions before getting into potential testing of this idea.
>>
>>1143846

>he uses RGui even if he has RStudio already installed

disgusting
>>
>>1144208
RStudio is slower than RGui and you don't need all the extras in RStudio if you're actually just interested in copy&pasting your finished code into the console and look at the output. I have made the experience that RStudio is good for working on your code, but actually running it is way more stable in RGui. Everytime I wanted to cancel a big for-loop RStudio crashed while RGui seems to be indestructible.
>>
trade against day traders. with 95% being losers, doing the opposite of they day is major profit.
>>
>>1144214

i never got RStudio to crash.
that being said, i never wrote a for loop with 1000000000 iterations like you did.
what do you even need the j for, i can't spot it inside the loop
>>
File: Capture.png (219KB, 1679x1049px) Image search: [Google]
Capture.png
219KB, 1679x1049px
>>1144226
yes, that is sort of the philosophy behind the whole idea as well. Question is just how profitable it really is, I think only backtesting can answer that.

>>1144231
It's actually just an arbitrarily high number, it has to be at least 50,400 high to cover all seconds in a trading day here in Germany. But I experienced crashes with RStudio even at this number when trying to get out of the running for-loop, but perhaps its just my computer. The loop runs essentially over the whole charting program every second as everything has to be updated with the new information which is being re-loaded into R from the .csv-file, which in turn is information that iMacros saves into the .csv-file continuously on a second basis (written in JavaScript).
>>
>>1144300

i see. nice setup, i like your dedication.
>>
>>1144300
Is there a reason why u chose to write in JavaScript instead of let's say Python?
>>
File: JavaScript iMacros.png (72KB, 1191x1003px) Image search: [Google]
JavaScript iMacros.png
72KB, 1191x1003px
>>1144345
Yes, note that the charts you see in the pics are just outputs written in R, while the actual data-feed (for now) works with iMacros in the following way:

(1) go to website with intraday realtime quotes
(2) copy quotes every second
(3) save them to .csv file
(4) repeat 1-3

However, iMacros works only either with its proprietary language as .iim-files (which is a weak code) or with Javascript. JScript is preferable as it gives you more flexibility working with loops. The basic JS-code is quite small as seen in his picture.
>>
>>1144353
Ah alright I see, I was thinking of continious basic web scrapping but I understand that is not an option here.
>>
>>1144067
What are the other three indicators btw?

So a lot of people are talking shit about Elliot Wave theory, which I don't quite understand.

I've been studying TA for a short two months now, and I actually notice a lot of Elliot waves in charts. At least I think I do.

What is your comment when people critique the use of Elliot theory?
>>
>>1143846

You got some source code you can share?
>>
>>1144199
>wanted to hear opinions before getting into potential testing
Fuck that. Write the code and back test it. See what points in time it fails and tune it.
>>
>>1144407
won't be useful to anyone since it's really tailored to my sources and iMacros implementation. But you can get the general idea from looking at the pictures here. The rest is just looking at R packages like quantmod, quantstrat and TTR and see what you can do with them. iMacros itself is actually pretty straightforward but I had to learn a little JScript first in order to write a more efficient and faster code for webscrapping intraday data. A specific simpler code is in this pic, which takes the DAX-future/indication that Commerzbank provides for its the German retail derivatives market. But the method can scrap virtually anything, no matter if Commerzbank, GS, CBOE, NYMEX etc.

Like I said: professionals of course have intraday tick-data subscription which is way easier to implement but also costs a lot of $$$ per month. As I am currently in the testing/developing phase I tend to stick to my solution for now, then in the long run get some subscription of what I really need.
>>
>>1144422

I only know basic R right now, but I'd like to have your level of proficiency. What's your background in this? Self-taught?
>>
do you have a liquidity indicator?
>>
>>1143846
Generally the reason why "do opposite of X" is not a good trading strategy is because X is not actually *bad* (i.e. always less than 50% correct), it's because X is *inconsistent* (i.e. 50%).

>>1144158
True, there are things that are correlated, but in order for your plan to work there also needs to be one stock following the other in time. Usually the case is such that the stocks are hand-in-hand moving, so by the concept of beating the stock to the punch is impossible.
>>
One day you will wake up and realize you are wasting your time ....

Trading is 10% system/indicators, 40% psychology, 50% money management
>>
>>1144524
ditto.

Do you have anything we could play around with OP?
>>
>>1144864
>implying indicators aren't psychology

What did you think technical indicators represented this whole time?
>>
>>1143846
>Now, a question that is being stuck in my head is: when you take the really simple e.g. crossover (SMA / MACD / Stochastic) indicator-strategies, then they don't really make profit in the longer run.
Stopped reading right there.
>>
So your code sucks so bad that you figure doing the opposite of what it says you might make money?

Might just work anon
>>
>>1144524
Mostly self-taught, I know it seems like a non-intuitive language and many experts agree, Python is actually way more intuitive. However, once you got into R and noticed its tremendous speed and familiarized yourself a little with the code it becomes more easy, but still I find myself looking through packages and google stuff often. With all languages: it definitely helps to know a thing or two about statistics and higher math since what you're dealing with is actually nothing but time series, I am focusing on time series analysis and statistics in general (currently finishing my MS in Economics). This is especially useful if you want to apply simulations or ARIMA/GARCH models to your strategies or risk management, which I plan to do further down the road.

>>1144576
Unfortunately I have none yet.

>>1144745
Thank you, good input.

>>1144864
I know about the importance of MM and psychology, however, I want to specify and automate my personal system as much as can be done, especially coding my own alert mechanism. Hard-coding trading rules helps you pin down your strategy and really see if what you're doing makes any sense or not. Once I have a solid strategy with good alerts I can decide whether to automate or decide whether to invest on a case-by-case basis. I do agree most with MM, once you figure out a strategy that fits you, you need to first minimize potential losses, and only then improve profits, a lot of experts say minimizing losses is much more important than to focus on how to make profits.

>>1144976
What are you trying to say? That momentum techniques like SMA-crossovers work well in trending markets? Well yes they do, but during backtesting you will realize that sideways-markets extinguish all your profits as these techniques completely fail during these periods. Hence why overall the strategies don't generate much profit. It boils down to figuring out a filter to see if there is a trend or not, and that is very hard to do.
>>
>>1144745
>True, there are things that are correlated, but in order for your plan to work there also needs to be one stock following the other in time. Usually the case is such that the stocks are hand-in-hand moving, so by the concept of beating the stock to the punch is impossible.

Really? Not even a few seconds to react? Crazy.
>>
>>1144964
Guess i wasnt clear enough, didnt mean the psychology of the majority of market participants. Your personal psychologu as a trader is 40% of the battle. Trusting your trading system is harder than you think, especially after a drawdown.
>>
File: 1327836371556s.jpg (3KB, 108x126px) Image search: [Google]
1327836371556s.jpg
3KB, 108x126px
>>1145267
>Hence why overall the strategies don't generate much profit. It boils down to figuring out a filter to see if there is a trend or not, and that is very hard to do.

Multitimeframe analysis. I use W1, D1, H4 for entering. Ideally i want to see a trend on W1 and D1 in one direction and then fading it on H4 whenever a contrarian trend pops up (provided you have some kind of signal to give you the green light). You could do the same on lower timeframes, but you need more higher tfs aligned. I used to use MACD once, now i just use my own eyes (it's more effective, trust me)

Define an n-max/min (high/low over n days/weeks) that suits your trading style, and use those levels as reference points to see how price behaves around those levels. Use a long term approach, ideally you might want to hold your positions for a long enough time to generate returns well above 10R, so you can exploit trends fully. Find a way to keep your stops small so you can have very high R values if you get the trend right.

Learn correlations, learn how the market prices risks and what it really wants to see from key events so you decide either to stay in or gtfo if market's expectations are disappointed.
About the psychology part, i'd say it plays out for something like 70% of your trading system. The reason being, it is insanely hard to use a trend following approach, insanely hard to stay out of the markets when they are sideways and even harder to withstand 20 losses in a row before getting that one "monster trade". And above all, learning how to "let go", that is, you will easily see paper profits above 10R evaporate sometimes, and be tempted to change the rules to chase that one profit in the future. Sorta like chasing your tail
Oh and on top of that you will learn how inversely proportional win rate/long term profitability are.
Addendum: virtually any system works if you stick with the main trend. You just need to tailor the one you are comfortable with
>>
>>1145267
>but during backtesting you will realize that sideways-markets extinguish all your profits as these techniques completely fail during these periods.
You are so fucking wrong. I am thinking you don't trade at all. Professionals know better. I am sorry you are too insecure to trade for a living but I guess that's what makes a market.
>>
>>1148104
Except that he is right. Automated strategies are unable to consistently sort out range/trade environment, which is why they all go belly up sooner or later.
We are all here to learn something, and OP seems cool and unlike the 90% of this board he is willing to put up the effort.
Go be retarded elsewhere, grown ups are talking
>>
>>1143846
Finance major here, where is the best place to learn to learn python?
>>
>>1148576
A well-taught CS1 course. Otherwise, probably reading an O'Reilly book and doing a ton of projects on your own.
>>
File: WebscrapDirectly.png (136KB, 1679x1049px) Image search: [Google]
WebscrapDirectly.png
136KB, 1679x1049px
For those here interested to see the speed of data gathering and display in R/Python for intraday (high-frequency?) use, here is a simple code you can run yourself:

You must have R/RStudio installed, additionally you must have the "rvest"-package, to install the package just type into the console: install.packages("rvest"), then chose a server and let it download and install itself. After it's done, just copy/paste the following code:

library("rvest")
htmlpage <- read_html("http://www.derivate.bnpparibas.com/realtime/tabellen/uebersicht")
for (j in 1:100){
htmlpage <- read_html("http://www.derivate.bnpparibas.com/realtime/tabellen/uebersicht")
series_nodes <- html_nodes(htmlpage,".tv-price span")
series <- html_text(series_nodes)
c <- c(1,1)
plot(c, col="white", xlab="", ylab="", xaxt="n", yaxt="n")
mtext(paste(" USD/JPY : LAST = ",series[23],sep=""), side=3, line=-6, adj=0.05, cex=2, col="blue")
mtext(" (This is an indication rate modeled by BNP Paribas)", side=3, line=-10, adj=0.05, cex=1.3, col="blue")
}

You will see a new window with the USD/JPY continuously refreshing multiple times per second. This is an example of scrapping intraday data from BNP Paribas, but of course other sources can be considered as well.
>>
>>1144199
Use rsi and macd divergences with their parameters set to the timeframe of your trade
>>
It seems to me that the real reason these strategies fail is not because they make trades which lose at a statistically higher rate than they make trades which win, but that the fees involved with making a trade, whether it wins or loses, require a successful strategy to be successful by a large margin.

It's entirely possible that the trading strategies you're referring to DO make correct trades, but not by a large enough margin. So if they're beating the market by .05%, then financially speaking they're still losing to the trade fees.

Inverting this strategy would leave you .05% below the market, in this scenario. Unless they're terrible, and underperforming the market even before fees are accounted for, in which case you could beat them out by selling options, but not the individual stocks being traded because there's no upward trend being held to by the assets addressed by the poor trading strategy you're seeking to mirror.
>>
Question for OP.. can you elaborate on how you get the csv file and send it to your analysis program?
>>
>>1149062

Nvm I see that most of your thread is explaining just that.. I have some further questions for a completely different application that could be lucrative. Message me on Skype if interested Furion229
>>
>>1148572
Adults in a peep show, that is.

Your argument is that the earth is flat. That was proved wrong hundreds of years ago. Dragging a flat earth theory into trading analysis might be a form of mental masturbation for you. What mu are you using? While you're figuring that out I am making money.
>>
>>1148994
>It seems to me that the real reason these strategies fail
Are you keeping the proof of your statement under your stacks of furry porn?
>>
>>1144377
Elliot wave theory, like fibonacci retracements, is rooted in human psychology. You can actually test it yourself by gambling. You will notice, that there are situations of hope or despair, that correlate to the progress of the gamblesession and the percentual stake you initially invested.
Most prominent situations are the break even point and the 50% loss point.
Major players in stock have chosen to respect these theories, so you have to at least recognise them aswell.
>>
Do whatever you want as long as you follow 1 rule .... NEVER TAKE A BIG LOSS. If you never lose more than 1% of capital on a single trade you will figure it out. Not blowing up is milestone #1, then you will figure out how to make money. Sometimes the most successful strategies are simple, not complex. And most of all, stop looking for the holy grail ... it doesnt exist.
Thread posts: 59
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.