Warning: SQLite3::querySingle(): Unable to prepare statement: 1, no such table: sites in /home/admin/web/local.example.com/public_html/index.php on line 46
 Download Historical Forex Data - Forex Software

Download Historical Forex Data - Forex Software

Forex Factory CSV Data

Scrapped Forex Factory Calendar, because got tired of keeping my algorithms purely technical.
There is data from 2012-01-01. Feel free to use it. The event and its meta data can be matched on the ID field.
https://www.dropbox.com/sh/sh4mw4igpbhggdg/AADwpdCW-o8EmDbLiXlPxDCCa?dl=0
submitted by barumal to algotrading [link] [comments]

Closing Prices to CSV file script for MetaTrader 4 – Free Forex EA Robots

submitted by forexearobots to u/forexearobots [link] [comments]

Forex History Dump CSV script for MetaTrader 4

Forex History Dump CSV script for MetaTrader 4 submitted by forexearobots to u/forexearobots [link] [comments]

Can powershell be used to divide a csv file of an entire month of forex tick data into smaller files of 30 minutes interval?

The format for the tick data is like this:
Date/Time Price
2018/08/01 00:00:00.070 111.832
2018/08/01 00:00:00.078 111.831
Is there any way to split a large csv file containing an entire month of price data into smaller files containing 30 minutes of price data?
submitted by Ifffrt to PowerShell [link] [comments]

I have created a monster.

I have been trading for 3 months (6 months demo before that). Up until 3 days ago I have always traded with discipline, set SL, understood risk management and make reports out of downloadable CSV data from the broker. I even journal each trade at the end of the day. Each trade I make risks from 0.5% - 2% depending on how confident I am on the particular trade. The first 2 months of grind made 5% and 7% respectively.
Several days ago, I lost 3 trades in a row and felt like George Costanza. It was especially demoralizing because I followed the technical, fundamental, trend, and confirmed with indicator, etc... yet, each went straight for my SL. I took the day off and reflected on what I did wrong. I lost 6% of my capital that day, a whole month's work.
The very next day, during the Fed chair Powell speech, I focused on EUUSD, and as the chart started to run higher and higher, I am not sure what came over me, I entered long at 1.18401 and risked 20% of my capital. I was going to enter my usual 2% risk, but the greed (subconsciously?) in me added an extra 0. The very second the trade was entered, I felt a hot flash and my heart started pumping, I entered into loss territory, my heart sunk as I watch it go down 10 pips, 15 pips, if only for 15 seconds. Then it started going up, and it was exhilarating watching the profits. I had the good sense to enter TP at 1.189, and it got there 15 minutes later. I had just made a little over 10% of my capital in 15 minutes. Recovered yesterday's 6% loss and then some.
I told my self that this was a one time thing, stupid and impulsive thing to do... until the next day...
I saw a good opportunity with USD/JPY. I didn't even bother to check anything, technical, fundamental, indicators, NOTHING! Just that vertical cliff short candle... , my god, that full short candle, and the speed! This time, very much a conscious decision, I entered short with 30% of my capital at 106.5. 4 hours later, I hit my TP at 105.5. I had made 30% of my capital in 4 hours.
In the last 2 trading days, up 40% of my capital, including my previous 2 months of measly 12% in comparison, I am roughly up 50% of my original capital in 3 months.
This has been a good week to say the least. But I am afraid I have created an insatiable monster. The greed has overtaken good sense, and this is quite possibly the origin story of a blown account.
submitted by DodoGizmo to Forex [link] [comments]

The Mouthbreather's Guide to the Galaxy

The Mouthbreather's Guide to the Galaxy
Alright CYKAS, Drill Sgt. Retarded TQQQ Burry is in the house. Listen up, I'm gonna train yo monkey asses to make some motherfucking money.

“Reeee can’t read, strike?” - random_wsb_autist
Bitch you better read if you want your Robinhood to look like this:
gainz, bitch


Why am I telling you this?
Because I like your dumb asses. Even dickbutts like cscqb4. And because I like seeing Wall St. fucking get rekt. Y’all did good until now, and Wall St. is salty af. Just google for “retail traders” news if you haven’t seen it, and you’ll see the salty tears of Wall Street assholes. And I like salty Wall St. assholes crying like bitches.
https://www.zerohedge.com/markets/retail-investors-are-crushing-hedge-funds-again

That said, some of you here are really motherfucking dense & the sheer influx of retardation has been driving away some of the more knowledgeable folks on this sub. In fact, in my last post, y'all somehow managed to downvote to shit the few guys that really understood the points I was making and tried to explain it to you poo-slinging apes. Stop that shit yo! A lot of you need to sit the fuck down, shut your fucking mouth and listen.
So I'm going to try and turn you rag-tag band of dimwits into a respectable army of peasants that can clap some motherfucking Wall Street cheeks. Then, I'm going to give you a mouthbreather-proof trade that I don't think even you knuckleheads can mess up (though I may be underestimating you).
If you keep PM-ing me about your stupid ass losses after this, I will find out where you live and personally, PERSONALLY, shit on your doorstep.
This is going to be a long ass post. Read the damned post. I don't care if you're dyslexic, use text-to-speech. Got ADHD? Pop your addys, rub one out, and focus! Are you 12? Make sure to go post in the paper trading contest thread first.

THE RULES:
  1. Understand that most of this sub has the critical reading skills of a 6 year old and the attention span of a goldfish. As such, my posts are usually written with a level of detail aimed at the lowest common denominator. A lot of details on the thesis are omitted, but that doesn't mean that the contents in the post are all there is to it. If I didn't do that, every post'd have to be longer than this one, and 98% of you fucks wouldn't read it anyway. Fuck that.
  2. Understand that my style of making plays is finding the >10+ baggers that are underpriced. As such, ALL THE GOD DAMN PLAYS I POST ARE HIGH-RISK / HIGH-REWARD. Only play what you can afford to risk. And stop PM-ing me the second the market goes the other way, god damn it! If you can't manage your own positions, I'm going to teach your ass the basics.
  3. Do you have no idea what you're doing and have a question? Google it first. Then google it again. Then Bing it, for good measure. Might as well check PornHub too, you never know. THEN, if you still didn't find the answer, you ask.
  4. This sub gives me Tourette's. If you got a problem with that, well fuck you.

This shit is targeted at the mouthbreathers, but maybe more knowledgeable folk’ll find some useful info, idk. How do you know if you’re in the mouthbreather category? If your answer to any of the following questions is yes, then you are:
  • Are you new to trading?
  • Are you unable to manage your own positions?
  • Did you score into the negatives on the SAT Critical Reading section?
  • Do you think Delta is just an airline?
  • Do you buy high & sell low?
  • Do you want to buy garbage like Hertz or American Airlines because it's cheap?
  • Did you buy USO at the bottom and are now proud of yourself for making $2?
  • Do you think stOnKs oNLy Go uP because Fed brrr?
  • Do you think I'm trying to sell you puts?
  • If you take a trade you see posted on this sub and are down, do you PM the guy posting it?
  • Do you generally PM people on this sub to ask them basic questions?
  • Is your mouth your primary breathing apparatus?
Well I have just the thing for you!


Table of Contents:
I. Maybe, just maybe, I know what I’m talking about
II. Post-mortem of the February - March 2020 Great Depression
III. Mouthbreather's bootcamp on managing a position – THE TECHNICALS
IV. Busting your retarded myths
V. LIQUIDITY NUKE INBOUND
VI. The mouthbreather-proof trade - The Akimbo
VII. Quick hints for non-mouthbreathers


Chapter I - Maybe, just maybe, I know what I’m talking about
I'm not here to rip you off. Every fucking time I post something, a bunch of dumbasses show up saying I'm selling you puts or whatever the fuck retarded thoughts come through their caveman brains.
"hurr durr OP retarded, OP sell puts" - random_wsb_autist
Sit down, Barney, I'm not here to scam you for your 3 cents on OTM puts. Do I always get it right? Of course not, dumbasses. Eurodollar play didn't work out (yet). Last TQQQ didn't work out (yet). That’s just how it goes. Papa Buffet got fucked on airlines. Plain retard Burry bought GME. What do you fucking expect?
Meanwhile, I keep giving y'all good motherfucking plays:
  1. 28/10/2019: "I'ma say this again, in case you haven't heard me the first time. BUY $JNK PUTS NOW!". Strike: "11/15, 1/17 and 6/19". "This thing can easily go below 50, so whatever floats your boat. Around $100 strike is a good entry point."
  2. 3/9/2020: "I mean it's a pretty obvious move, but $JNK puts."
  3. 3/19/2020, 12pm: "UVXY put FDs are free money." & “Buy $UVXY puts expiring tomorrow if we're still green at 3pm. Trust me.”
  4. 3/24/2020: “$UUP 3/27 puts at $27.5 or $27 should be 10-baggers once the bill passes. I'd expect it to go to around $26.”
And of course, the masterpiece that was the TQQQ put play.
Chapter II. Post-mortem of the February - March 2020 Great Depression
Do you really understand what happened? Let's go through it.
I got in puts on 2/19, right at the motherfucking top, TQQQ at $118. I told you on 2/24 TQQQ ($108) was going to shit, and to buy fucking puts, $90ps, $70ps, $50ps, all the way to 3/20 $30ps. You think I just pulled that out of my ass? You think I just keep getting lucky, punks? Do you have any idea how unlikely that is?
Well, let's take a look at what the fuckstick Kevin Cook from Zacks wrote on 3/5:
How Many Sigmas Was the Flash Correction Plunge?
"Did you know that last week's 14% plunge in the S&P 500 SPY was so rare, by statistical measures, that it shouldn't happen once but every 14,000 years?"
"By several measures, it was about a 5-sigma move, something that's not "supposed to" happen more than once in your lifetime -- or your prehistoric ancestors' lifetimes!
"According to general statistical principles, a 4-sigma event is to be expected about every 31,560 days, or about 1 trading day in 126 years. And a 5-sigma event is to be expected every 3,483,046 days, or about 1 day every 13,932 years."

On 3/5, TQQQ closed at $81. I just got lucky, right? You should buy after a 5-sigma move, right? That's what fuckstick says:
"Big sigma moves happen all the time in markets, more than any other field where we collect and analyze historical data, because markets are social beasts subject to "wild randomness" that is not found in the physical sciences.
This was the primary lesson of Nassim Taleb's 2007 book The Black Swan, written before the financial crisis that found Wall Street bankers completely ignorant of randomness and the risks of ruin."
I also took advantage of the extreme 5-sigma sell-off by grabbing a leveraged ETF on the Nasdaq 100, the ProShares UltraPro QQQ TQQQ. In my plan, while I might debate the merits of buying AAPL or MSFT for hours, I knew I could immediately buy them both with TQQQ and be rewarded very quickly after the 14% plunge."
Ahahaha, fuckstick bought TQQQ at $70, cuz that's what you do after a random 5-sigma move, right? How many of you dumbasses did the same thing? Don't lie, I see you buying 3/5 on this TQQQ chart:
https://preview.redd.it/9ks35zdla5151.png?width=915&format=png&auto=webp&s=2c90d08494c52a1b874575ee233624e61ac27620
Meanwhile, on 3/3, I answered the question "Where do you see this ending up at in the next couple weeks? I have 3/20s" with "under 30 imo".

Well good fucking job, because a week later on 3/11, TQQQ closed at $61, and it kept going.
Nomura: Market staring into the abyss
"The plunge in US equities yesterday (12 March) pushed weekly returns down to 7.7 standard deviations below the norm. In statistical science, the odds of a greater-than seven-sigma event of this kind are astronomical to the point of being comical (about one such event every 160 billion years).
Let's see what Stephen Mathai-Davis, CFA, CQF, WTF, BBQ, Founder and CEO of Q.ai - Investing Reimagined, a Forbes Company, and a major fucktard has to say at this point:

"Our AI models are telling us to buy SPY (the SPDR S&P500 ETF and a great proxy for US large-cap stocks) but since all models are based on past data, does it really make sense? "
"While it may or may not make sense to buy stocks, it definitely is a good time to sell “volatility.” And yes, you can do it in your brokerage account! Or, you can ask your personal finance advisor about it."
"So what is the takeaway? I don’t know if now is the right time to start buying stocks again but it sure looks like the probabilities are in your favor to say that we are not going to experience another 7 standard deviation move in U.S. Stocks. OTM (out-of-the-money) Put Spreads are a great way to get some bullish exposure to a rally in the SPY while also shorting such rich volatility levels."
Good job, fuckfaces. Y'all bought this one too, admit it. I see you buying on this chart:
https://preview.redd.it/s9344geza5151.png?width=915&format=png&auto=webp&s=ebaef4b1414d901e6dafe354206ba39eb03cb199
Well guess what, by 3/18, a week later, we did get another 5 standard deviation move. TQQQ bottomed on 3/18 at $32.73. Still think that was just luck, punk? You know how many sigmas that was? Over 12 god-damn sigmas. 12 standard deviations. I'd have a much better chance of guessing everyone's buttcoin private key, in a row, on the first try. That's how unlikely that is.
https://preview.redd.it/luz0s3kbb5151.png?width=587&format=png&auto=webp&s=7542973d56c42e13efd3502331ac6cc5aea42630
"Hurr durr you said it's going to 0, so you're retarded because it didn't go to 0" - random_wsb_autist
Yeah, fuckface, because the Fed bailed ‘em out. Remember the $150b “overnight repo” bazooka on 3/17? That’s what that was, a bailout. A bailout for shitty funds and market makers like Trump's handjob buddy Kenny Griffin from Citadel. Why do you think Jamie Dimon had a heart attack in early March? He saw all the dogshit that everyone put on his books.

https://preview.redd.it/8fqvt37ama151.png?width=3711&format=png&auto=webp&s=0b06ee5101685c5274c6641a62ee9eb1a2a3f3ee


Read:
https://dealbreaker.com/2020/01/griffin-no-show-at-white-house
https://www.cnbc.com/2020/03/11/bank-ceos-convene-in-washington-with-president-trump-on-coronavirus.html
https://www.proactiveinvestors.co.uk/companies/news/914736/market-makers--didn-t-show-up-for-work--macro-risk-ceo-says-914736.html
https://www.chicagobusiness.com/finance-banking/chicago-trading-firms-seek-more-capital
https://www.housingwire.com/articles/did-non-qm-just-disappear-from-the-market/
https://www.bloomberg.com/news/articles/2020-03-22/bruised-hedge-funds-ask-clients-for-fresh-cash-to-buy-the-dip
https://fin24.com/Markets/Bonds/rand-bonds-rally-after-reserve-bank-intervention-20200320

Yup, everyone got clapped on their stupidly leveraged derivatives books. It seems Citadel is “too big to fail”. On 3/18, the payout on 3/20 TQQQ puts alone if it went to 0 was $468m. And every single TQQQ put expiration would have had to be paid. Tens or hundreds of billions on TQQQ puts alone. I’d bet my ass Citadel was on the hook for a big chunk of those. And that’s just a drop in the bucket compared to all the other blown derivative trades out there.

https://preview.redd.it/9ww27p2qb5151.png?width=2485&format=png&auto=webp&s=78f24265f3ea08fdbb37a4325f15ad9b61b0c694
Y’all still did good, 3/20 closed at $35. That’s $161m/$468m payoff just there. I even called you the bottom on 3/17, when I saw that bailout:

"tinygiraffe21 1 point 2 months ago
Haha when? I’m loading up in 4/17 25 puts"
"dlkdev
Scratch that, helicopter money is here."
"AfgCric 1 point 2 months ago
What does that mean?"
"It means the Fed & Trump are printing trillions with no end in sight. If they go through with this, this was probably the bottom."

"hurr durr, it went lower on 3/18 so 3/17 wasn't the bottom" - random_wsb_autist
Idiot, I have no way of knowing that Billy boy Ackman was going to go on CNBC and cry like a little bitch to make everyone dump, so he can get out of his shorts. Just like I have no way of knowing when the Fed decides to do a bailout. But you react to that, when you see it.
Do you think "Oh no world's ending" and go sell everything? No, dumbass, you try to figure out what Billy's doing. And in this case it was pretty obvious, Billy saw the Fed train coming and wanted to close his shorts. So you give the dude a hand, quick short in and out, and position for Billy dumping his short bags.
Video of Billy & the Fed train

Here's what Billy boy says:
“But if they don’t, and the government takes the right steps, this hedge could be worth zero, and the stock market could go right back up to where it was. So we made the decision to exit.”
https://www.businessinsider.sg/bill-ackman-explains-coronavirus-trade-single-best-all-time-podcast-2020-5
Also, “the single best trade of all time.” my ass, it was only a 100-bagger. I gave y’all a 150-bagger.
So how could I catch that? Because it wasn't random, yo. And I'm here to teach your asses how to try to spot such potential moves. But first, the technical bootcamp.

Chapter III. Mouthbreather's bootcamp on managing a position – THE TECHNICALS

RULE 1. YOU NEVER BUY OPTIONS AT OPEN. You NEVER OVERPAY for an option. You never FOMO into buying too fast. You NEVER EVER NEVER pump the premium on a play.
I saw you fuckers buying over 4k TQQQ 5/22 $45 puts in the first minutes of trading. You pumped the premium to over $0.50 dudes. The play's never going to work if you do that, because you give the market maker free delta, and he's going to hedge that against you. Let me explain simply:

Let's say a put on ticker $X at strike $50 is worth $1, and a put at strike $51 is worth $2.
If you all fomo in at once into the same strike, the market maker algos will just pull the asks higher. If you overpay at $2 for the $50p, the market maker will just buy $51ps for $2 and sell you $50ps for 2$. Or he'll buy longer-dated $50ps and sell you shorter-dated $50ps. Max risk for him is now 0, max gain is $1. You just gave him free downside insurance, so of course he's going to start going long. And you just traded against yourself, congrats.

You need to get in with patience, especially if you see other autists here wanting to go in at the same time. Don't step on each other's toes. You put in an order, and you wait for it to fill for a couple of seconds. If it doesn't fill, AND the price of the option hasn't moved much recently, you can bump the bid $0.01. And you keep doing that a few times. Move your strikes, if needed. Only get a partial fill or don't get a fill at all? You cancel your bid. Don't fucking leave it hanging there, or you're going to put a floor on the price. Let the mm algos chill out and go again later.

RULE 2. WATCH THE TIME. Algos are especially active at x:00, x:02, x:08, x:12, x:30 and x:58. Try not to buy at those times.
RULE 3. YOU USE MULTIPLE BROKERS. Don't just roll with Robinhood, you're just gimping yourself. If you don't have another one, open up a tasty, IB, TD, Schwab, whatever. But for cheap faggy puts (or calls), Robinhood is the best. If you want to make a play for which the other side would think "That's free money!", Robinhood is the best. Because Citadel will snag that free money shit like no other. Seriously, if you don't have a RH account, open one. It's great for making meme plays.

RULE 4. YOU DON'T START A TRADE WITH BIG POSITIONS. Doesn't matter how big or small your bankroll is. If you go all-in, you're just gambling, and the odds are stacked against you. You need to have extra cash to manage your positions. Which leads to
RULE 5. MANAGING YOUR WINNERS: Your position going for you? Good job! Now POUND THAT SHIT! And again. Move your strikes to cheaper puts/calls, and pound again. And again. Snowball those gains.
RULE 6A. POUND THOSE $0.01 PUTS:
So you bought some puts and they’re going down? Well, the moment they reach $0.01, YOU POUND THOSE PUTS (assuming there’s enough time left on them, not shit expiring in 2h). $0.01 puts have amazing risk/return around the time they reach $0.01. This is not as valid for calls. Long explanation why, but the gist of it is this: you know how calls have unlimited upside while puts have limited upside? Well it’s the reverse of that.
RULE 6B. MANAGING YOUR LOSERS:
Your position going against you? Do you close the position, take your loss porn and post it on wsb? WRONG DUMBASS. You manage that by POUNDING THAT SHIT. Again and again. You don't manage losing positions by closing. That removes your gainz when the market turns around. You ever close a position, just to have it turn out it would have been a winner afterwards? Yeah, don't do that. You manage it by opening other positions. Got puts? Buy calls. Got calls? Buy puts. Turn positions into spreads. Buy spreads. Buy the VIX. Sell the VIX. They wanna pin for OPEX? Sell them options. Not enough bankroll to sell naked? Sell spreads. Make them fight you for your money, motherfuckers, don't just give it away for free. When you trade, YOU have the advantage of choosing when and where to engage. The market can only react. That's your edge, so USE IT! Like this:

Example 1:
Initial TQQQ 5/22 position = $5,000. Starts losing? You pound it.

https://preview.redd.it/gq938ty8e5151.png?width=944&format=png&auto=webp&s=734ab7ed517f0e6822bfaaed5765d1272de398d1
Total pounded in 5/22 TQQQ puts = $10,824. Unfortunately expired worthless (but also goes to show I'm not selling you puts, dickwads)
Then the autists show up:
"Hahaha you lost all your money nice job you fucking idiot why do you even live?" - cscqb4
Wrong fuckface. You see the max pain at SPX 2975 & OPEX pin coming? Sell them some calls or puts (or spreads).

https://preview.redd.it/7nv23fr41a151.jpg?width=750&format=pjpg&auto=webp&s=14a8879c975646ffbfe2942ca1982bfabfcf90df
Sold 9x5/20 SPX calls@2975, bam +$6,390. Still wanna pin? Well have some 80x5/22 TQQQ $80cs, bam anotha +$14,700.

https://preview.redd.it/1iqtpmc71a151.jpg?width=750&format=pjpg&auto=webp&s=df9b954131b0877f4acc43038b4a5a4acf544237
+$21,090 - $10,824 = +$10,266 => Turned that shit into a +94.85% gain.

.cscqb4 rn

You have a downside position, but market going up or nowhere? You play that as well. At least make some money back, if not profit.

Example 2:

5/22, long weekend coming right? So you use your brain & try to predict what could happen over the 3-day weekend. Hmm, 3 day weekend, well you should expect either a shitty theta-burn or maybe the pajama traders will try to pooomp that shite on the low volume. Well make your play. I bet on the shitty theta burn, but could be the other, idk, so make a small play.

Sold some ES_F spreads (for those unaware, ES is a 50x multiplier, so 1 SPX = 2 ES = 10 SPY, approximately). -47x 2955/2960 bear call spreads for $2.5. Max gain is $2.5, max loss is 2960-2955 = $5. A double-or-nothing basically. That's $5,875 in premium, max loss = 2x premium = $11,750.
Well, today comes around and futures are pumping. Up to 3,014 now. Do you just roll over? You think I'm gonna sit and take it up the ass? Nah bros that's not how you trade, you fucking fight them. How?
I have:
47x 2960 calls
-47x 2955 calls

Pajama traders getting all up in my grill? Well then I buy back 1 of the 2955 calls. Did that shit yesterday when futures were a little over 2980, around 2982-ish. Paid $34.75, initially shorted at $16.95, so booked a -$892 loss, for now. But now what do I have?

46x 2955/2960 bear calls
1x 2960 long call

So the fuckers can pump it. In fact, the harder they pump it, the more I make. Each $2.5 move up in the futures covers the max loss for 1 spread. With SPX now at ~3015, that call is $55 ITM. Covers 24/46 contracts rn. If they wanna run it up, at 3070 it's break-even. Over that, it's profit. I'll sell them some bear call spreads over 3050 if they run it there too. They gonna dump it? well under 2960 it's profit time again. They wanna do a shitty pin at 3000 today? Well then I'll sell them some theta there.
Later edit: that was written yesterday. Got out with a loss of only $1.5k out of the max $5,875. Not bad.
And that, my dudes, is how you manage a position.

RULE 7 (ESPECIALLY FOR BEARS). YOU DON'T KEEP EXTRA CASH IN YOUR BROKER ACCOUNT. You don't do it with Robinhood, because it's a shitty dumpsterfire of a broker. But you don't do it with other brokers either. Pull that shit out. Preferably to a bank that doesn't play in the markets either, use a credit union or some shit. Why? Because you're giving the market free liquidity. Free margin loans. Squeeze that shit out, make them work for it. Your individual cash probably doesn't make a dent, but a million autists with an extra $1200 trumpbucks means $1.2b. That's starting to move the needle. You wanna make a play, use instant deposits. And that way you don't lose your shit when your crappy ass broker or bank gets its ass blown up on derivative trades. Even if it's FDIC or SIPC insured, it's gonna take time until you see that money again.


Chapter IV. BUSTING YOUR RETARDED MYTHS

MYTH 1 - STONKS ONLY GO UP

Do you think the market can go up forever? Do you think stOnKs oNLy Go uP because Fed brrr? Do you think SPX will be at 5000 by the end of the month? Do you think $1.5 trillion is a good entry point for stonks like AAPL or MSFT? Do you want to buy garbage like Hertz or American Airlines because it's cheap? Did you buy USO at the bottom and are now proud of yourself for making $2? Well, this section is for you!
Let's clear up the misconception that stonks only go up while Fed brrrs.

What's your target for the SPX top? Think 3500 by the end of the year? 3500 by September? 4000? 4500? 5000? Doesn't matter, you can plug in your own variables.

Let's say SPX only goes up, a moderate 0.5% each period as a compounded avg. (i.e. up a bit down a bit whatever, doesn't matter as long as at the end of your period, if you look back and do the math, you'll get that number). Let's call this variable BRRR = 0.005.

Can you do the basic math to calculate the value at the end of x periods? Or did you drop out in 5th grade? Doesn't matter if not, I'll teach you.


Let's say our period is one week. That is, SPX goes up on average 0.5% each week on Fed BRRR:
2950 * (1.005^x), where x is the number of periods (weeks in this case)

So, after 1 month, you have: 2950 * (1.005^4) = 3009
After 2 months: 2950 * (1.005^8) = 3070
End of the year? 2950 * (1.005^28) = 3392

Now clearly, we're already at 3015 on the futures, so we're moving way faster than that. More like at a speed of BRRR = 1%/wk

2950 * (1.01^4) = 3069
2950 * (1.01^8) = 3194
2950 * (1.01^28) = 3897


Better, but still slower than a lot of permabulls would expect. In fact, some legit fucks are seriously predicting SPX 4000-4500 by September. Like this dude, David Hunter, "Contrarian Macro Strategist w/40+ years on Wall Street". IDIOTIC.
https://twitter.com/DaveHcontrarian/status/1263066368414568448

That'd be 2950 * (BRRR^12) = 4000 => BRRR = 1.0257 and 2950 * (BRRR^12) = 4500 => BRRR = 1.0358, respectively.

Here's why that can't happen, no matter the amount of FED BRRR: Leverage. Compounded Leverage.

There's currently over $100b in leveraged etfs with a 2.5x avg. leverage. And that's just the ones I managed to tally, there's a lot of dogshit small ones on top of that. TQQQ alone is now at almost $6b in AUM (topped in Fed at a little over $7b).

Now, let's try to estimate what happens to TQQQ's AUM when BRRR = 1.0257. 3XBRRR = 1.0771. Take it at 3XBRRR = 1.07 to account for slippage in a medium-volatility environment and ignore the fact that the Nasdaq-100 would go up more than SPX anyway.

$6,000,000,000 * (1.07^4) = $7,864,776,060
$6,000,000,000 * (1.07^8) = $10,309,100,000
$6,000,000,000 * (1.07^12) = $13,513,100,000
$6,000,000,000 * (1.07^28) = $39,893,000,000.

What if BRRR = 1.0358? => 3XBRR = 1.1074. Take 3XBRRR = 1.10.
$6,000,000,000 * (1.1^4) = $8,784,600,000
$6,000,000,000 * (1.1^8) = $12,861,500,000
$6,000,000,000 * (1.1^12) = $18,830,600,000
$6,000,000,000 * (1.1^28) = $86,526,000,000

And this would have to get 3x leveraged every day. And this is just for TQQQ.

Let's do an estimation for all leveraged funds. $100b AUM, 2.5 avg. leverage factor, BRRR = 1.0257 => 2.5BRRR = 1.06425

$100b * (1.06^4) = $128.285b
$100b * (1.06^8) = $159.385b
$100b * (1.06^12) = $201.22b
$100b * (1.06^28) = $511.169b

That'd be $1.25 trillion sloshing around each day. And the market would have to lose each respective amount of cash into these leveraged funds. Think the market can do that? You can play around with your own variables. But understand that this is just a small part of the whole picture, many other factors go into this. It's a way to put a simple upper limit on an assumption, to check if it's reasonable.

In the long run, it doesn't matter if the Fed goes BRRR, if TQQQ takes in it's share of 3XBRRR. And the Fed can't go 3XBRRR, because then TQQQ would take in 9XBRRR. And on top of this, you have a whole pile of leveraged derivatives on top of these leveraged things. Watch (or rewatch) this: Selena Gomez & Richard H. Thaler Explaining Synthetic CDO through BLACKJACK

My general point, at the mouth-breather level, is that Fed BRRR cannot be infinite, because leverage.
And these leveraged ETFs are flawed instruments in the first place. It didn't matter when they started out. TQQQ and SQQQ started out at $8m each. For the banks providing the swaps, for the market providing the futures contracts, whatever counter-party to whatever instrument they would use, that was fine. Because it balanced out. When TQQQ made a million, SQQQ lost a million (minus a small spread, which was the bank's profit). Bank was happy, in the long run things would even out. Slippage and spreads and fees would make them money. But then something happened. Stonks only went up. And leveraged ETFs got bigger and more and more popular.
And so, TQQQ ended up being $6-7b, while SQQQ was at $1b. And the same goes for all the other ETFs. Long leveraged ETF AUM became disproportionate to short AUM. And it matters a whole fucking lot. Because if you think of the casino, TQQQ walks up every day and says "I'd like to put $18b on red", while SQQQ walks up and says "I'd only like to put $3b on black". And that, in turn, forces the banks providing the swaps to either eat shit with massive losses, or go out and hedge. Probably a mix of both. But it doesn't matter if the banks are hedged, someone else is on the other side of those hedges anyway. Someone's eating a loss. Can think of it as "The Market", in general, eating the loss. And there's only so much loss the market can eat before it craps itself.

If you were a time traveller, how much money do you think you could make by trading derivatives? Do you think you could make $20 trillion? You know the future prices after all... But no, you couldn't. There isn't enough money out there to pay you. So you'd move the markets by blowing them up. Call it the Time-travelling WSB Autist Paradox.

If you had a bucket with a hole in the bottom, even if you poured an infinite amount of water into it, it would never be full. Because there's a LIQUIDITY SINK, just like there is one in the markets.
And that, my mouth-breathing friends, is the reason why FED BRRR cannot be infinite. Or alternatively, "STONKS MUST GO BOTH UP AND DOWN".

MYTH 2 - YOU CAN'T TIME THE MARKET

On Jan 14, 2020, I predicted this: Assuming that corona doesn't become a problem, "AAPL: Jan 28 $328.3, Jan 31 $316.5, April 1 $365.7, May 1 $386, July 1 $429 December 31 $200."
Now take a look at the AAPL chart in January. After earnings AAPL peaked at $327.85. On 1/31, after the 1st hour of trading, when the big boys make moves, it was at $315.63. Closed 1/31 at $309.51. Ya think I pulled this one out of my ass too?
Yes you can time it. Flows, motherfucker, flows. Money flow moves everything. And these days, we have a whole lot of RETARDED FLOW. Can't even call it dumb flow, because it literally doesn't think. Stuff like:

  • ETF flows. If MSFT goes up and AAPL goes down, part of that flow is going to move from AAPL to MSFT. Even if MSFT flash-crashes up to $1000, the ETF will still "buy". Because it's passive.
  • Option settlement flows. Once options expire, money is going to flow from one side to another, and that my friends is accurately predictable from the data.
  • Index rebalancing flows
  • Buyback flows
  • 401k passive flows
  • Carry trade flows
  • Tax day flows
  • Flows of people front-running the flows

And many many others. Spot the flow, and you get an edge. How could I predict where AAPL would be after earnings within 50 cents and then reverse down to $316 2 days later? FLOWS MOTHERFUCKER FLOWS. The market was so quiet in that period, that is was possible to precisely figure out where it ended up. Why the dump after? Well, AAPL earnings (The 8-K) come out on a Wednesday. The next morning, after market opens the 10-Q comes out. And that 10-Q contains a very important nugget of information: the latest number of outstanding shares. But AAPL buybacks are regular as fuck. You can predict the outstanding shares before the market gets the 10-Q. And that gives you EDGE. Which leads to

MYTH 3 - BUYBACKS DON'T MATTER

Are you one of those mouthbreathers that parrots the phrase "buybacks are just a tax-efficient way to return capital to shareholders"? Well sit the fuck down, I have news for you. First bit of news, you're dumb as shit. Second bit:

On 1/28, AAPL's market cap is closing_price x free_float_outstanding_shares. But that's not the REAL MARKET CAP. Because the number of outstanding shares is OLD AS FUCK. When the latest number comes out, the market cap changes instantly. And ETFs start moving, and hedges start being changed, and so on.

"But ETFs won't change the number of shares they hold, they will still hold the same % of AAPL in the index" - random_wsb_autist

Oh my fucking god you're dumb as fuck. FLOWS change. And the next day, when TQQQ comes by and puts its massive $18b dong on the table, the market will hedge that differently. And THAT CAN BE PREDICTED. That's why AAPL was exactly at $316 1 hour after the market opened on 1/31.

So, what can you use to spot moves? Let me show you:
Market topped on 2/19. Here’s SPY. I even marked interesting dates for you with vertical lines.

https://preview.redd.it/7agm171eh5151.png?width=3713&format=png&auto=webp&s=d94b90dcd634c8dc688925585bf0a02c3299f71b
Nobody could have seen it coming, right? WRONG AGAIN. Here:

https://preview.redd.it/i1kdp3cgh5151.png?width=3713&format=png&auto=webp&s=7a1e086e9217846547efd3b6c5249f4a7ebe6d9e
In fact, JPYUSD gave you two whole days to see it. Those are NOT normal JPYUSD moves. But hey maybe it’s just a fluke? Wrong again.

https://preview.redd.it/fsyhenckh5151.png?width=3693&format=png&auto=webp&s=03200e10b008257ae15d40b474c4cf4d8c23670f
Forex showed you that all over the place. Why? FLOWS MOTHERFUCKER FLOWS. When everything moves like that, it means the market needs CASH. It doesn’t matter why, but remember people pulling cash out of ATMs all over the world? Companies drawing massive revolvers? Just understand what this flow means.
The reversal:
https://preview.redd.it/4xe97l0oh5151.png?width=1336&format=png&auto=webp&s=07aaa93f6b1d8f542101e40e431edccbc109918f
https://preview.redd.it/v6i0pdmoh5151.png?width=1338&format=png&auto=webp&s=74d5589961db2f978d4d582e6d7c58a85f6305f9
But it wasn’t just forex. Gold showed it to you as well. Bonds showed it to you as well.
https://preview.redd.it/40j53u8th5151.png?width=3711&format=png&auto=webp&s=fe39ab51321d0f98149d33e33253e69f96c48e23
Even god damn buttcoin showed it to you.
https://preview.redd.it/43lvafhvh5151.png?width=3705&format=png&auto=webp&s=1ef53283cbc0fb97f71c1ba935c0bd747809636e
And they all did it for 2 days before the move hit equities.

Chapter V. LIQUIDITY NUKE INBOUND
You see all these bankruptcies that happened so far, and all the ones that are going to follow? Do you think that’s just dogshit companies and it won’t have major effects on anything outside them? WRONG.
Because there’s a lot of leveraged instruments on top of those equities. When the stock goes to 0, all those outstanding puts across all expirations get instantly paid.
Understand that Feb-March was a liquidity MOAB. But this will end with a liquidity nuke.
Here’s just HTZ for example: $239,763,550 in outstanding puts. Just on a single dogshit small-cap company (this thing was like $400m mkt. cap last week).
And that’s just the options on the equity. There’s also instruments on etfs that hold HTZ, on the bonds, on the ETFs that hold their bonds, swaps, warrants, whatever. It’s a massive pile of leverage.
Then there’s also the ripple effects. Were you holding a lot of HTZ in your brokerage margin account? Well guess what big boi, when that gaps to 0 you get a margin call, and then you become a liquidity drain. Holding long calls? 0. Bonds 0. DOG SHIT!
And the market instantly goes from holding $x in assets (HTZ equity / bonds / calls) to holding many multiples of x in LIABILITIES (puts gone wrong, margin loans, derivatives books, revolvers, all that crap). And it doesn’t matter if the Fed buys crap like HTZ bonds. You short them some. Because when it hits 0, it’s no longer about supply and demand. You get paid full price, straight from Jerome’s printer. Is the Fed going to buy every blown up derivative too? Because that's what they'd have to do.
Think of liquidity as a car. The faster it goes, the harder it becomes to go even faster. At some point, you can only go faster by driving off a cliff. THE SQUEEZE. But you stop instantly when you hit the ground eventually. And that’s what shit’s doing all over the place right now.
Rewatch: https://www.youtube.com/watch?v=3hG4X5iTK8M
And just like that fucker, “I’m standing in front of a burning house, and I’m offering you fire insurance on it.”

Don’t baghold!
Now is not the time to baghold junk. Take your cash. Not the time to buy cheap crap. You don’t buy Hertz. You don’t buy USO. You don’t buy airlines, or cruises, or GE, or motherfucking Disney. And if you have it, dump that shit.
And the other dogshit that’s at ATH, congrats you’re in the green. Now you take your profits and fucking dump that shit. I’m talking shit like garbage SaaS, app shit, AI shit, etc. Garbage like MDB, OKTA, SNAP, TWLO, ZM, CHGG etc.
And you dump those garbage ass leveraged ETFs. SQQQ, TQQQ, whatever, they’re all dogshit now.
The leverage MUST unwind. And once that’s done, some of you will no longer be among us if you don’t listen. A lot of leveraged ETFs will be gone. Even some non-leveraged ETFs will be gone. Some brokers will be gone, some market makers will be gone, hell maybe even some big bank has to go under. I can’t know which ones will go poof, but I can guarantee you that some will. Another reason to diversify your shit. There’s a reason papa Warrant Buffet dumped his bags, don’t think you’re smarter than him. He may be senile, but he’s still a snake.
And once the unwind is done, THEN you buy whatever cheap dogshit’s still standing.
Got it? Good.
You feel ready to play yet? Alright, so you catch a move. Or I post a move and you wanna play it. You put on a small position. When it’s going your way, YOU POUND DAT SHIT. Still going? Well RUSH B CYKA BLYAT AND PLANT THE GOD DAMN 3/20 $30p BOMB.

Chapter VI - The mouthbreather-proof play - THE AKIMBO
Still a dumbass that can’t make a play? Still want to go long? Well then, I got a dumbass-proof trade for you. I present to you THE AKIMBO:

STEP 1. You play this full blast. You need some real Russian hardbass to get you in the right mood for trading, cyka.
STEP 2. Split your play money in 3. Remember to keep extra bankroll for POUNDING THAT SHIT.
STEP 3. Use 1/3 of your cash to buy SQQQ 9/18 $5p, pay $0.05. Not more than $0.10.
STEP 4. Use 1/3 of your cash to buy TQQQ 9/18 $20p, pay around $0.45. Alternatively, if you’re feeling adventurous, 7/17 $35p’s for around $0.5.
STEP 5. Use 1/3 of your cash to buy VIX PUT SPREADS 9/15 $21/$20 spread for around $0.15, no more than $0.25. That is, you BUY the 21p and SELL the 20p. Only using Robinhood and don’t have the VIX? What did I just tell you? Well fine, use UVXY then. Just make sure you don’t overpay.


Chapter VII - Quick hints for non-mouthbreathers
Quick tips, cuz apparently I'm out of space, there's a 40k character limit on reddit posts. Who knew?

  1. Proshares is dogshit. If you don't understand the point in my last post, do this: download https://accounts.profunds.com/etfdata/ByFund/SQQQ-historical_nav.csv and https://accounts.profunds.com/etfdata/ByFund/SQQQ-psdlyhld.csv. Easier to see than with TQQQ. AUM: 1,174,940,072. Add up the value of all the t-bills = 1,686,478,417.49 and "Net other assets / cash". It should equal the AUM, but you get 2,861,340,576. Why? Because that line should read: NET CASH = -$511,538,344.85
  2. Major index rebalancing June 22.
  3. Watch the violent forex moves.
  4. 6/25 will be red. Don't ask, play a spread, bag a 2x-er.
  5. 6/19 will be red.
  6. Not settled yet, but a good chance 5/28 is red.
  7. Front run the rebalance. Front-run the front-runners of the rebalance too. TQQQ puts.
  8. Major retard flow in financials yesterday. Downward pressure now. GS 180 next weeks looks good.
  9. Buy leaps puts on dogshit bond ETFs (check holdings for dogshit)
  10. Buy TLT 1/15/2021 $85ps for cheap, sell over $1 when the Fed stops the ass rape, rinse and repeat
  11. TQQQ flow looks good:
https://preview.redd.it/untvykuxea151.jpg?width=750&format=pjpg&auto=webp&s=a0a38c0acb088ebff689d043e48466eb76d38e2f

Good luck. Dr. Retard TQQQ Burry out.
submitted by dlkdev to wallstreetbets [link] [comments]

The best way to export account history to CSV?

Hi,
I was wondering how to export the daily historical Net Liquidating Value of the whole account to CSV? What I get from the Account Statement, is historical Cash and Forex separate from the actual Orders and Trades and the current Net Liquidating Value. Should I go the API route? Thank you!
submitted by astrae_research to thinkorswim [link] [comments]

Need good forex data

Hello forex community! I am looking for a place where I can download good high quality forex data by the tick in a .csv format for all the majors from Jan 01 2000 or earlier to Dec 31 2019. I am ok with paying some money but not too much money for such data.
Does any one have any recommendations? Thank you all kindly in advance!
submitted by BogdanovCoding to Forex [link] [comments]

PSA: I forked a Tampermonkey script to extract your order/product data from AliExpress into a csv list.

Aloha!
Export aliexpress orders to clipboard as csv is a Tampermonkey skript that will:
Like all those scripts this one is still depending on scraping the web page. You have to advance through the order pages manually, grabbing every page and pasting it to editoExcel/Sheets....
It grabs the historic exchange rates from api.exchangeratesapi.io. If you're not a EURo guy/gal, you can just ignore the columns, as the script keeps the original amounts, e.g. in USD.
This is basically a fork of two existing scripts that didn't fulfill my needs (credited in the Readme). I even retained their names.

Hope this can be helpful to you. Let me know what you think and have fun using it!
submitted by ohuf to Aliexpress [link] [comments]

How to optimise the speed of my Pandas code?

Hi learnpython,
My first attempt at writing my own project. Prior to this I had never used classes or Pandas so it's been a difficult learning curve. I was hoping to get some feedback on the overall structure - does everything look sensible? Are there better ways of writing some bits?
I also wanted to specifically check how I can increase the execution speed. I currently iterate rows which Pandas did say will be slow, but I couldn't see a workaround. The fact it is quite slow makes me think there is a better solution that I'm missing.
To run the code yourself download a .csv of Forex data and store in same folder as script - I used Yahoo finance GBP USD.
"""This program simulates a Double SMA (single moving average) trading strategy. The user provides a .csv file containing trade history and two different window sizes for simple moving averages (smallest number first). The .csv must contain date and close columns - trialled on Yahoo FX data). The program will generate a 'buy' signal when the short SMA is greater than the long SMA, and vice versa. The results of each trade are stored and can be output to a .csv file.""" import pandas as pd class DoubleSMA(): """Generates a Double SMA trading system.""" def __init__(self, name, sma_a, sma_b): """Don't know what goes here.""" self.name = name self.sma_a = sma_a self.sma_b = sma_b self.index = 0 self.order = 'Start' self.signal = '' def gen_sma(self, dataset, sma): """Calculates SMA and adds as column to dataset.""" col_title = 'sma' + str(sma) dataset[col_title] = dataset['Close'].rolling(sma).mean() return dataset def gen_signal(self, row, dataset): """Generates trade signal based on comparison of SMAs.""" if row[0] == (dataset.shape[0] - 1): #Reached final line of dataset; close current trade. self.order = 'Finish' elif row[3] > row[4]: self.signal = 'Buy' elif row[3] < row[4]: self.signal = 'Sell' def append_result(row, result, order): """Adds 'entry' details to results dataframe (i.e. opens trade).""" result = result.append({"Entry date": row[1], "Pair": "GBPUSD", "Order": order, "Entry price": row[2]}, ignore_index=True) return result def trade(row, order, signal, index, result): """Executes a buy or sell routine depending on signal. Flips between 'buy' and 'sell' on each trade.""" if order == 'Start': order = signal result = append_result(row, result, order) elif order == 'Finish': result.iloc[index, 1] = row[1] result.iloc[index, 5] = row[2] elif order != signal: #Close current trade result.iloc[index, 1] = row[1] result.iloc[index, 5] = row[2] index += 1 order = signal result = append_result(row, result, order) return order, index, result def result_df(): """Creates a dataframe to store the results of each trade.""" result = pd.DataFrame({"Entry date": [], "Exit date": [], "Pair": [], "Order": [], "Entry price": [], "Exit price": [], "P/L": []}) return result def dataset_df(): """Opens and cleans up the data to be analysed.""" dataset = pd.read_csv('GBPUSD 2003-2020 Yahoo.csv', usecols=['Date', 'Close']) dataset.dropna(inplace=True) dataset['Close'] = dataset['Close'].round(4) return dataset def store_result(result): """Outputs results table to .csv.""" result.to_csv('example.csv') def calc_pl(result): """Calculates the profil/loss of each row of result dataframe.""" pass #Complete later dataset = dataset_df() result = result_df() sma_2_3 = DoubleSMA('sma_2_3', 2, 3) dataset = sma_2_3.gen_sma(dataset, sma_2_3.sma_a) dataset = sma_2_3.gen_sma(dataset, sma_2_3.sma_b) dataset.dropna(inplace=True) dataset.reset_index(inplace=True, drop=True) for row in dataset.itertuples(): sma_2_3.gen_signal(row, dataset) sma_2_3.order, sma_2_3. index, result = trade(row, sma_2_3.order, sma_2_3.signal, sma_2_3.index, result) calc_pl(result) print(result) store_result(result) 
submitted by tbYuQfzB to learnpython [link] [comments]

For those of you interested in the algo trading bot I posted a couple weeks ago, I will be releasing a market watcher only version of it (beta) for free

Hi guys, I know a lot of people expressed interest in the algo trading bot I posted about a few weeks ago: https://www.reddit.com/passive_income/comments/c8ocr5/after_months_of_tweaking_ive_finally_got_my_algo/

I thought about it, and I finally figured out how to release it publicly without it impacting my trading.
For the public version, I'm going to strip out the live trading functionality, and have it be a market-watcher only system. Essentially, you'll be able to configure specific strategies, and have it notify you when that strategy has a buy/sell signal emerge (so you'd have to do the trade manually)

You'll be able to run a backtest on any particular planned trading pair (eg USD-TSLA, BTC-ZEC, CAD-GBP), which will output a CSV sheet with backtested data against every possible strategy ordered by profitability.

You'll then be able to create market watchers (what I dub 'Tipsters', essentially live paper-traders) with the following settings:

These tipsters will then watch the market live, and simulate trading/keep track of simulated profitability.
App will have the following features:

There's a couple other 'surprises' I plan on having in the app too, but I'll keep those a secret for now (mostly hilarious stuff, but may wind up being useful).


So the question is, would you make use of something like this? Would you find it useful?
submitted by MrGruntsworthy to passive_income [link] [comments]

How to assemble lots of csv files into a master workbook for Power Query?

Hello excel
I have a web scrapper collecting data into a csv. The csv file is named with the day’s date that the data came from and so is the sheet inside it that holds the data. Here is what that looks like -> I have been collecting data for 14 days, hence I have 14 csv files.
What’s in the csv file? Size in column A, price in column B, and a timestamp (h:mm:ss.000) in column C. I am collecting trade data from the USD-AUD Forex market.

A (Size) B (Price) C (Time)
1 500 $1.48 18:00:37.564
2 1200 $1.47 18:01:45.123
This is oversimplified, as there are tens of thousands of rows sometimes. I would like to run analysis on this data, I am curious as to the best practice for organizing this data for analyzation via power query and power pivot?
Current method is creating a master xlsx file, then I open up each csv file one by one and use the ‘move/copy’ to create a copy in this master workbook. Now that I have all the data sorted in sheets that are labeled with the dates they came from, I am wondering if I am doing this the best way or if I should be loading them in through power query or something. I am fairly new to power query and power pivot but I learn very quick.
Would a database be a better idea for this data? Each market generates around 30-80k trades on an average day, however that can approach 200k to 400k rows when there is volatility.
I welcome any analytical advice you might have, especially if you're a trader. I am attempting to look at the coupling/decoupling of several markets, this being one, as a potential tool for trading targets and am open to any suggestions on how analyze this.
submitted by LavishManatee to excel [link] [comments]

Moving python webscrapper to the cloud....how?

Hello aws,
I have a python script, several actually, pulling from several pages on the same main site.
I am pulling forex data, 24/7, for a stats capstone project and the values are being logged to a .csv file. The script keeps the .csv it is logging too locked until 23:59:59, where it closes out that day's .csv and then opens a new one for the new day logging. Had a power outage here and since I am capturing this data from my house, that was the end for my data capture.
How would I go about putting this application on the cloud to avoid this problem? Also, this program runs on windows now, I would like to move it over to a raspberry pi. How would I go about doing that? Would I be able to use the Windows 10 IOT or should I use linux? What ways would I need to adapt this python script to work on linux?
Any recommendations are much appreciated on both fronts, thank you!
submitted by LavishManatee to aws [link] [comments]

[R] Trouble creating a Log Scale graph of Zimbabwean Dollars vs United States Dollars

First things first:
Dataset from kaggle
This image from Wikipedia is what I want to create
R code:
library(ggplot2) african_economicdata <- read.csv("african_crises.csv") Z_ED <- subset(african_economicdata, country == "Zimbabwe") Z_ED2001 <- subset(Z_ED, year > 2000) Z_ED2001$log10_exchange <- log10(Z_ED2001$exch_usd) ggplot(Z_ED2001, aes(Z_ED2001$year,Z_ED2001$log10_exchange)) + geom_line() +geom_point() + xlab("Year") + ylab("Exchange Rate in USD") + theme_minimal() 
Here is what the result looks like
A few things are throwing me off:
  1. This happens to be a cross section of two things i never really understood in my bachelors, forex and logarithms
  2. From the eye test the curve looks similar to the image from wikipedia, but the y-axis values don't make much sense to me (possibly due logarithms as previously stated).
  3. The dataset in Kaggle is light on details and I don't really know how to interpret the exchange rate values. Take 2001 for instance, does 5.510 x 10-25 mean that 1 ZWD is equal to 5.510 x 10-25 USD? The number is so small that it kind of melts my brain.
  4. I'm having trouble finding information about the ZWD during this time period, the trends in the wikipedia image for OMIR and the Parallel rate seems to have much fine grain data, looking at the fluctuations between 07-08. Does that mean that the data I'm working with would be the Official data?
submitted by CJEntusBlazeIt_420 to econometrics [link] [comments]

Help setting up semi automated system

I am after a trading platform that can do the following
At market open: buy Stop loss = buyx(constant) Sell = buyy(constant) OR close order at: market open
submitted by peachesxxxx to Forex [link] [comments]

Dukascopy/Tickstory forex volume data is not trading volume

Getting Dukascopy / Tickstory forex data (I think the most famous free source of forex tick data), I noticed that the tick data csv has "bid volume" and "ask volume" columns.
Getting bar data for them, the "volume" column is just the sum of the "bid volume" of all ticks in the bar.

The way I understand the tick data, "bid volume" and "ask volume" are not real trading volumes, but rather the quantities in the top level of the order book (highest bid and lowest ask). If this is true, the "volume" data column in the bar data is very misleading, and this very famous and widely used data source does not contain 1) actual trading prices 2) trading volume.
Am I missing something? Dukascopy data can be obtained here: https://www.dukascopy.com/plugins/fxMarketWatch/?historical_data
submitted by cruvadom to algotrading [link] [comments]

Big Data Set for Crypto Backtesting

I have a huge data set from the past couple of months with the price of cryptocurrencies off of CoinMarketCap as well as Forex prices off of XRates. The CoinMarketCap data is every five minutes and the XRates data is every minute. I collected data between August and November. The data is in csv format. I want to share all this data. Is there a good place I can share it? Thanks for the help!
submitted by Dotherightthing253 to algotrading [link] [comments]

Eyes to today U.S. Retail Sales data

Eyes to today U.S. Retail Sales data

https://preview.redd.it/qkj8eltoy1531.png?width=1366&format=png&auto=webp&s=83da8b2c97f5d408f4357f71cf5c6931f6e56c02
Weekly Trend: Overbought
1st Resistance: 1. 1268
2nd Resistance: 1.1370
1st Support: 1.1100
2nd Support: 1.098
Analysis by SGT Markets
Full review of SGT: https://www.topasiafx.com/best-forex-brokesgt-markets
#Forex #Analysis #ForexBroker #EURUSD #GBPUSD #AUDUSD
submitted by ronykhanfx to TopAsiaFX [link] [comments]

code check: First time with classes

Ive done a few small projects but this is the first project that I've made that uses classes. So far the class should take in the location of the csv file, then open is and split it up into each element going on a table. This is all supposed to be handling simple forex data.
if you see any issues please let me know. the compiler I'm using throws no errors rn.

 import csv class fxData: """ takes in the location of the raw data as a string creates an object with attribute rawData is the instance of a csv file on run time """ def __init__(self,rawData): raw=open(rawData,"r") listOfStrings = raw.read() splitlist=listOfStrings.split("\n") self.fxList=[] for row in splitlist: d = row.split(",") #makes it seperate elements if d == [""]:#checks for the end of list break date = d[0] #date t = d[1] #time o = float(d[2]) #open h = float(d[3]) #high l = float(d[4]) #low c = float(d[5]) #close row_data = [date,t,o,h,l,c] self.fxList.append(row_data) """ creates a list of a table for the time period data """ def rawTimeData(self,fxList,timeperiod,row): returnData = self.fxList[row:row+timeperiod] return returnData; #creates simple moving aerage for that one element def sma(self,returnData): counter=0 total = 0 for x in returnData: counter +=1 total=returnData[5] + total average = total/counter return average 

submitted by nomoreerrorsplox to learnpython [link] [comments]

Daily Trading Thread - Friday 2.9.18

Hi everyone! Thanks for joining. This sub is for active traders of crypto and stocks, those looking to make a fat YUGE profit. While all are welcome, we are more geared for traders with a serious mindset. Post your ideas for today here.
Follow us on StockTwits and chat live on our Discord: trader chat.
Wiki: resources
FINVIZ HEATMAP - FINVIZ FUTURES - FOREX - NEWS FEED
FEB 9th FRI Fear & Greed Index
Economic Calendar: Results & More
Time Release For Actual Expected Prior
10:00:00 AM Wholesale Inventories Dec - 0.2% 0.2%
Ex-Dividend: Calendar
Ex- Div Company Amt Yield
AAPL Apple Rg 0.63 0.02
ANCX Access Natl Rg 0.15 0.02
BGSF BG Staffing Rg 0.25 0.06
CDR Cedar Real Trt R Rg 0.05 0.08
COF Capital One Finl Rg 0.40 0.02
COL Rockwell Collins Rg 0.33 0.01
COP ConocoPhillips Rg 0.29 0.02
CSV Carriage Service Rg 0.08 0.01
CWT Cal Water Serv G Rg 0.19 0.02
FIBK 1st Intst Banc Rg-A 0.28 0.02
GORO Gold Resource Rg 0.00 0.01
GWW WW Grainger Rg 1.28 0.02
HP Helmerich&Payne Rg 0.70 0.04
IBTX Independent Bnk Rg 0.12 0.01
LAZ Lazard Rg-A 1.71 0.03
LOGM LogMeIn Rg 0.30 0.01
MRLN Marlin Business Rg 0.14 0.02
NATI Natl Instruments Rg 0.23 0.02
NBL Noble Energy Rg 0.10 0.01
OA Orbital ATK Rg 0.32 0.01
OPY Oppenheim NVtg Rg-A 0.11 0.00
OSK Oshkosh Rg 0.24 0.01
PAG Penske Auto Grou Rg 0.34 0.03
PZZA Papa Johns Intl Rg 0.23 0.01
ROSE Rosetta Resources 0.10 0.00
SC Santander USA Rg 0.05 0.00
SCHN SCHNITZER STEEL IND 0.19 0.02
SJW SJW Group 0.28 0.02
SONA Southern Ntl Bancor - Registered 0.08 0.02
WMK Weis Markets Rg 0.30 0.03
XOM Exxon Mobil Rg 0.77 0.04
Earnings Reports: Morningstar Earnings Calendar & Results
Company Release Est. EPS
Applied Genetic Technologies (AGTC) Afternoon -0.09
Brookfield Infrastructure Partners (BIP) Morning 0.56
Buckeye Partners (BPL) Morning 0.88
CAE (CAE) Morning 0.22
Cameco (CCJ) Morning 0.29
Cboe Global Markets (CBOE) Morning 0.88
Essent Group (ESNT) Morning 0.78
Gorman-Rupp (GRC) Morning 0.31
ImmunoGen (IMGN) Morning -0.10
Malibu Boats (MBUU) Morning 0.47
Moody's (MCO) Morning 1.45
Motorcar Parts of America (MPAA) Morning 0.49
Newmark Group (NMRK) Morning 0.30
Newpark Resources (NR) Afternoon 0.03
NGL Energy Partners (NGL) Morning 0.19
Oaktree Strategic Income (OCSI) Morning 0.20
PG&E (PCG) Morning 0.73
Semiconductor Manufacturing Int'l (SMI) Morning N/A
Tenneco (TEN) Morning 1.64
Ventas (VTR) Morning 1.03
Xinyuan Real Estate (XIN) Morning N/A
PRE-MARKET MOVERS: $PIRS $FEYE $NVDA $SOXL $DGAZ $NWL $XIV $VALE $YANG $LABU $STM $SQ $AIG $RIG $QLD $FAS $TECL $CLF
ROCKET BOT - FINVIZ TOP GAINERS - FINVIZ TOP LOSERS
Crypto Watch List: BTC XRP ETH LTC XVG XRB GAS NEO WTC PPT SALT FUN OMG ICX ETC STEEM POE EOS SC ZCL XLM LEND VEN
COIN MARKET CAP - COINDESK NEWS - RISING/FALLING
Disclaimer: The opinions in this thread and forum are solely the opinions of the individual account holders and contributors. The info should not be regarded as investment advice or as a recommendation of any particular security. All investments entail risks. As with most things in life, caveat emptor.
submitted by theprofitgod to The_Profit [link] [comments]

Using Python and Pandas to explore trader sentiment data

FXCM’s Speculative Sentiment Index (SSI) focuses on buyers and sellers, comparing how many are active in the market and producing a ratio to indicate how traders are behaving in relation to a particular currency pair. A positive SSI ratio indicates more buyers are in the market than sellers, while a negative SSI ratio indicates that more sellers are in the market. FXCM’s sentiment data was designed around this index, providing 12 sentiment measurements per minute (click here for an overview of each measurement.)
The sample data is stored in a GNU compressed zip file on FXCM’s GitHub as https://sampledata.fxcorporate.com/sentiment/{instrument}.csv.gz. To download the file, we’ll use this URL, but change {instrument} to the instrument of our choice. For this example we’ll use EUUSD price.
import datetime import pandas as pd url = 'https://sampledata.fxcorporate.com/sentiment/EURUSD.csv.gz' data = pd.read_csv(url, compression='gzip', index_col='DateTime', parse_dates=True) """Convert data into GMT to match the price data we will download later""" import pytz data = data.tz_localize(pytz.timezone('US/Eastern')) data = data.tz_convert(pytz.timezone('GMT')) """Use pivot method to pivot Name rows into columns""" sentiment_pvt = data.tz_localize(None).pivot(columns='Name', values='Value') 
Now that we have downloaded sentiment data, it would be helpful to have the price data for the same instrument over the same period for analysis. Note the sentiment data is in 1-minute increments, so I will need to pull 1-minute EURUSD candles. We could pull this data into a DataFrame quickly and easily using fxcmpy, however the limit of the number of candles we can pull using fxcmpy is 10,000, which is fewer than the number of 1-minute candles in January 2018. Instead, we can download the candles in 1-week packages from FXCM’s GitHub and create a loop to compile them into a DataFrame. This sounds like a lot of work, but really it’s only a few lines of code. Similarly to the sentiment data, historical candle data is stored in GNU zip files which can be called by their URL.
url = 'https://candledata.fxcorporate.com/' periodicity='m1' ##periodicity, can be m1, H1, D1 url_suffix = '.csv.gz' symbol = 'EURUSD' start_dt = datetime.date(2018,1,2)##select start date end_dt = datetime.date(2018,2,1)##select end date start_wk = start_dt.isocalendar()[1] end_wk = end_dt.isocalendar()[1] year = str(start_dt.isocalendar()[0]) data=pd.DataFrame() for i in range(start_wk, end_wk+1): url_data = url + periodicity + '/' + symbol + '/' + year + '/' + str(i) + url_suffix print(url_data) tempdata = pd.read_csv(url_data, compression='gzip', index_col='DateTime', parse_dates=True) data=pd.concat([data, tempdata]) """Combine price and sentiment data""" frames = data['AskClose'], sentiment_pvt.tz_localize(None) combineddf = pd.concat(frames, axis=1, join_axes=[sentiment_pvt.tz_localize(None).index], ignore_index=False).dropna() combineddf 
At this point you can begin your exploratory data analysis. We started by viewing the descriptive statistics of the data, creating a heatmap of the correlation matrix, and plotting a histogram of the data to view its distribution. View this articleto see our sample code and the results.
submitted by JasonRogers to AlgoTradingFXCM [link] [comments]

Who are the best data providers for forex sentiment data? Paid or free

I'm looking for data sources that provide sentiment data for forex mainly in a csv,xml or API format. I need the raw data, not just pre-made interactive charts.
Here are some of the current sources I've found - FCMX - $1000/month for unlimited access. $1000 for 6 months of historic data. https://www.fxsentimentmarket.com/ - Data looks pretty cheap which is nice but makes me weary of the quality.
Thanks!
submitted by bbennett36 to Forex [link] [comments]

MetaTrader 5 Data Downloader - YouTube Exporting historical data with indicators FOREX $1,000 IN ONE DAY  FOREX TRADING 2020 - YouTube How to Build a Winning Machine Learning FOREX Strategy in ... Import csv to mt4

Forex Data To CSV Metatrader 4 Indicator. Do you want to collect and store historical forex data in a csv file? This indicator does the job for you. It collects data for any timeframe and currency pair. It collects the following data: Open Timestamp, Open Price, High Price, Low Price, Close Price and Volume. Forex Tester allows you to import an unlimited number of currency pairs and years of history data in almost any possible text format (ASCII *.csv, *.txt). We strongly recommend importing 1-minute data for accurate testing (it is possible to import higher timeframes but testing results may not be as good). How important is Forex Historical Data Download CSV? In fact, past data is so important, that Forex platforms commit a lot of capital to source that information. Some reports claim that Forex brokers and platforms allocate as much as $27 billion for such information globally. Now that is a big sign of how important past data is. For all csv data formats including Generic ASCII, MetaTrader, Ninja Trader and MetaStock; For both time frames like 1 Minute and Tick Data; To start the free download, follow the following url: Download Free Forex Historical Data. To have more details about all our data feed, please check this url: Data Files – Detailed Specification Download and copy the history forex files: Load the necessary data in Forex Strategy Builder (CSV) format. 100 000 bars is a good start. Copy and paste the downloaded forex data files in the new Data Source directory. Now the new data will be available in the Editor.

[index] [298] [2037] [1559] [2370] [1604] [2267] [1835] [1106] [3452] [4314]

MetaTrader 5 Data Downloader - YouTube

The simple video tutorial will show you how to import live currency data from the web into your excel spread sheet. I will also show you how to get this data... FOREX WHEN TO ENTER AND EXIT A TRADE 90% ACCURATE FOREX TRADING 2020 - Duration: 20:34. ... Importing CSV file into Metatrader - Duration: 2:42. FxAnalyst Edas 20,426 views. http://www.tradingintl.com - Want to learn to trade forex online. We can show you how in this great video. Continue your free education at forex-blog.org. Free Demo ... Glad this video helped, no more products for sale no more courses either, study the videos they will teach you everything you need to become a 6 and 7 figure... 🤟 Discord 🤟: https://discord.gg/W9SkpvV Recommended Forex Broker ICMarkets: http://www.icmarkets.com/?camp=38580 myfxbook Live Results https://www.myfxbook.c...

#