Download Stock Data and Historical Quotes for Foreign ...

Forextory: Tick data 99%

Forextory is the cheapest tool to help you download Forex historical data since 2004 with 99% modelling quality for traders to backtest trading strategies.
[link]

Algorithmic Trading

A place for redditors to discuss quantitative trading, statistical methods, econometrics, programming, implementation, automated strategies, and bounce ideas off each other for constructive criticism. Feel free to submit papers/links of things you find interesting.
[link]

Where to download historical data of SP500 for Forex Tester 2.0?

I can't find. I also tried to add as symbol SP500 and get it from the brokers listed in the software, but no success.
submitted by evansgambit to Forex [link] [comments]

Downloading historical Forex tick data and importing them in to Python using Pandas

Downloading historical Forex tick data and importing them in to Python using Pandas submitted by jonromero to Python [link] [comments]

My third post: Downloading historical Forex tick data and importing them in to Python using Pandas

submitted by jonromero to algotrading [link] [comments]

Downloading historical Forex tick data and importing them into Python using Pandas

submitted by jonromero to programming [link] [comments]

Mathcad worksheet that downloads historical Forex rates by connecting to web data

Mathcad worksheet that downloads historical Forex rates by connecting to web data submitted by simulationconsultant to Forex [link] [comments]

My home-made bar replay for MT4

I made a home-made bar replay for MT4 as an alternative to the tradingview bar replay. You can change timeframes and use objects easily. It just uses vertical lines to block the future candles. Then it adjusts the vertical lines when you change zoom or time frames to keep the "future" bars hidden.
I am not a professional coder so this is not as robust as something like Soft4fx or Forex Tester. But for me it gets the job done and is very convenient. Maybe you will find some benefit from it.

Here are the steps to use it:
1) copy the text from the code block
2) go to MT4 terminal and open Meta Editor (click icon or press F4)
3) go to File -> New -> Expert Advisor
4) put in a title and click Next, Next, Finish
5) Delete all text from new file and paste in text from code block
6) go back to MT4
7) Bring up Navigator (Ctrl+N if it's not already up)
8) go to expert advisors section and find what you titled it
9) open up a chart of the symbol you want to test
10) add the EA to this chart
11) specify colors and start time in inputs then press OK
12) use "S" key on your keyboard to advance 1 bar of current time frame
13) use tool bar buttons to change zoom and time frames, do objects, etc.
14) don't turn on auto scroll. if you do by accident, press "S" to return to simulation time.
15) click "buy" and "sell" buttons (white text, top center) to generate entry, TP and SL lines to track your trade
16) to cancel or close a trade, press "close order" then click the white entry line
17) drag and drop TP/SL lines to modify RR
18) click "End" to delete all objects and remove simulation from chart
19) to change simulation time, click "End", then add the simulator EA to your chart with a new start time
20) When you click "End", your own objects will be deleted too, so make sure you are done with them
21) keep track of your own trade results manually
22) use Tools-> History center to download new data if you need it. the simulator won't work on time frames if you don't have historical data going back that far, but it will work on time frames that you have the data for. If you have data but its not appearing, you might also need to increase max bars in chart in Tools->Options->Charts.
23) don't look at status bar if you are moused over hidden candles, or to avoid this you can hide the status bar.


Here is the code block.
//+------------------------------------------------------------------+ //| Bar Replay V2.mq4 | //| Copyright 2020, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2020, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #define VK_A 0x41 #define VK_S 0x53 #define VK_X 0x58 #define VK_Z 0x5A #define VK_V 0x56 #define VK_C 0x43 #define VK_W 0x57 #define VK_E 0x45 double balance; string balance_as_string; int filehandle; int trade_ticket = 1; string objectname; string entry_line_name; string tp_line_name; string sl_line_name; string one_R_line_name; double distance; double entry_price; double tp_price; double sl_price; double one_R; double TP_distance; double gain_in_R; string direction; bool balance_file_exist; double new_balance; double sl_distance; string trade_number; double risk; double reward; string RR_string; int is_tp_or_sl_line=0; int click_to_cancel=0; input color foreground_color = clrWhite; input color background_color = clrBlack; input color bear_candle_color = clrRed; input color bull_candle_color = clrSpringGreen; input color current_price_line_color = clrGray; input string start_time = "2020.10.27 12:00"; input int vertical_margin = 100; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { Comment(""); ChartNavigate(0,CHART_BEGIN,0); BlankChart(); ChartSetInteger(0,CHART_SHIFT,true); ChartSetInteger(0,CHART_FOREGROUND,false); ChartSetInteger(0,CHART_AUTOSCROLL,false); ChartSetInteger(0,CHART_SCALEFIX,false); ChartSetInteger(0,CHART_SHOW_OBJECT_DESCR,true); if (ObjectFind(0,"First OnInit")<0){ CreateStorageHLine("First OnInit",1);} if (ObjectFind(0,"Simulation Time")<0){ CreateTestVLine("Simulation Time",StringToTime(start_time));} string vlinename; for (int i=0; i<=1000000; i++){ vlinename="VLine"+IntegerToString(i); ObjectDelete(vlinename); } HideBars(SimulationBarTime(),0); //HideBar(SimulationBarTime()); UnBlankChart(); LabelCreate("New Buy Button","Buy",0,38,foreground_color); LabelCreate("New Sell Button","Sell",0,41,foreground_color); LabelCreate("Cancel Order","Close Order",0,44,foreground_color); LabelCreate("Risk To Reward","RR",0,52,foreground_color); LabelCreate("End","End",0,35,foreground_color); ObjectMove(0,"First OnInit",0,0,0); //--- create timer EventSetTimer(60); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer EventKillTimer(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if (id==CHARTEVENT_CHART_CHANGE){ int chartscale = ChartGetInteger(0,CHART_SCALE,0); int lastchartscale = ObjectGetDouble(0,"Last Chart Scale",OBJPROP_PRICE,0); if (chartscale!=lastchartscale){ int chartscale = ChartGetInteger(0,CHART_SCALE,0); ObjectMove(0,"Last Chart Scale",0,0,chartscale); OnInit(); }} if (id==CHARTEVENT_KEYDOWN){ if (lparam==VK_S){ IncreaseSimulationTime(); UnHideBar(SimulationPosition()); NavigateToSimulationPosition(); CreateHLine(0,"Current Price",Close[SimulationPosition()+1],current_price_line_color,1,0,true,false,false,"price"); SetChartMinMax(); }} if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="New Sell Button") { distance = iATR(_Symbol,_Period,20,SimulationPosition()+1)/2; objectname = "Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1],foreground_color,2,5,false,true,true,"Sell"); objectname = "TP for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]-distance*2,clrAqua,2,5,false,true,true,"TP"); objectname = "SL for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]+distance,clrRed,2,5,false,true,true,"SL"); trade_ticket+=1; } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="New Buy Button") { distance = iATR(_Symbol,_Period,20,SimulationPosition()+1)/2; objectname = "Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1],foreground_color,2,5,false,true,true,"Buy"); objectname = "TP for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]+distance*2,clrAqua,2,5,false,true,true,"TP"); objectname = "SL for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]-distance,clrRed,2,5,false,true,true,"SL"); trade_ticket+=1; } } if(id==CHARTEVENT_OBJECT_DRAG) { if(StringFind(sparam,"TP",0)==0) { is_tp_or_sl_line=1; } if(StringFind(sparam,"SL",0)==0) { is_tp_or_sl_line=1; } Comment(is_tp_or_sl_line); if(is_tp_or_sl_line==1) { trade_number = StringSubstr(sparam,7,9); entry_line_name = trade_number; tp_line_name = "TP for "+entry_line_name; sl_line_name = "SL for "+entry_line_name; entry_price = ObjectGetDouble(0,entry_line_name,OBJPROP_PRICE,0); tp_price = ObjectGetDouble(0,tp_line_name,OBJPROP_PRICE,0); sl_price = ObjectGetDouble(0,sl_line_name,OBJPROP_PRICE,0); sl_distance = MathAbs(entry_price-sl_price); TP_distance = MathAbs(entry_price-tp_price); reward = TP_distance/sl_distance; RR_string = "RR = 1 : "+DoubleToString(reward,2); ObjectSetString(0,"Risk To Reward",OBJPROP_TEXT,RR_string); is_tp_or_sl_line=0; } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="Cancel Order") { click_to_cancel=1; Comment("please click the entry line of the order you wish to cancel."); } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam!="Cancel Order") { if(click_to_cancel==1) { if(ObjectGetInteger(0,sparam,OBJPROP_TYPE,0)==OBJ_HLINE) { entry_line_name = sparam; tp_line_name = "TP for "+sparam; sl_line_name = "SL for "+sparam; ObjectDelete(0,entry_line_name); ObjectDelete(0,tp_line_name); ObjectDelete(0,sl_line_name); click_to_cancel=0; ObjectSetString(0,"Risk To Reward",OBJPROP_TEXT,"RR"); } } } } if (id==CHARTEVENT_OBJECT_CLICK){ if (sparam=="End"){ ObjectsDeleteAll(0,-1,-1); ExpertRemove(); }} } //+------------------------------------------------------------------+ void CreateStorageHLine(string name, double value){ ObjectDelete(name); ObjectCreate(0,name,OBJ_HLINE,0,0,value); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrNONE); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); } void CreateTestHLine(string name, double value){ ObjectDelete(name); ObjectCreate(0,name,OBJ_HLINE,0,0,value); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrWhite); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); } bool IsFirstOnInit(){ bool bbb=false; if (ObjectGetDouble(0,"First OnInit",OBJPROP_PRICE,0)==1){return true;} return bbb; } void CreateTestVLine(string name, datetime timevalue){ ObjectDelete(name); ObjectCreate(0,name,OBJ_VLINE,0,timevalue,0); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrNONE); ObjectSetInteger(0,name,OBJPROP_BACK,false); ObjectSetInteger(0,name,OBJPROP_ZORDER,3); } datetime SimulationTime(){ return ObjectGetInteger(0,"Simulation Time",OBJPROP_TIME,0); } int SimulationPosition(){ return iBarShift(_Symbol,_Period,SimulationTime(),false); } datetime SimulationBarTime(){ return Time[SimulationPosition()]; } void IncreaseSimulationTime(){ ObjectMove(0,"Simulation Time",0,Time[SimulationPosition()-1],0); } void NavigateToSimulationPosition(){ ChartNavigate(0,CHART_END,-1*SimulationPosition()+15); } void NotifyNotEnoughHistoricalData(){ BlankChart(); Comment("Sorry, but there is not enough historical data to load this time frame."+"\n"+ "Please load more historical data or use a higher time frame. Thank you :)");} void UnHideBar(int barindex){ ObjectDelete(0,"VLine"+IntegerToString(barindex+1)); } void BlankChart(){ ChartSetInteger(0,CHART_COLOR_FOREGROUND,clrNONE); ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,clrNONE); ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_DOWN,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_UP,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_LINE,clrNONE); ChartSetInteger(0,CHART_COLOR_GRID,clrNONE); ChartSetInteger(0,CHART_COLOR_ASK,clrNONE); ChartSetInteger(0,CHART_COLOR_BID,clrNONE);} void UnBlankChart(){ ChartSetInteger(0,CHART_COLOR_FOREGROUND,foreground_color); ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,bear_candle_color); ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,bull_candle_color); ChartSetInteger(0,CHART_COLOR_BACKGROUND,background_color); ChartSetInteger(0,CHART_COLOR_CHART_DOWN,foreground_color); ChartSetInteger(0,CHART_COLOR_CHART_UP,foreground_color); ChartSetInteger(0,CHART_COLOR_CHART_LINE,foreground_color); ChartSetInteger(0,CHART_COLOR_GRID,clrNONE); ChartSetInteger(0,CHART_COLOR_ASK,clrNONE); ChartSetInteger(0,CHART_COLOR_BID,clrNONE);} void HideBars(datetime starttime, int shift){ int startbarindex = iBarShift(_Symbol,_Period,starttime,false); ChartNavigate(0,CHART_BEGIN,0); if (Time[WindowFirstVisibleBar()]>SimulationTime()){NotifyNotEnoughHistoricalData();} if (Time[WindowFirstVisibleBar()]=0; i--){ vlinename="VLine"+IntegerToString(i); ObjectCreate(0,vlinename,OBJ_VLINE,0,Time[i],0); ObjectSetInteger(0,vlinename,OBJPROP_COLOR,background_color); ObjectSetInteger(0,vlinename,OBJPROP_BACK,false); ObjectSetInteger(0,vlinename,OBJPROP_WIDTH,vlinewidth); ObjectSetInteger(0,vlinename,OBJPROP_ZORDER,10); ObjectSetInteger(0,vlinename,OBJPROP_FILL,true); ObjectSetInteger(0,vlinename,OBJPROP_STYLE,STYLE_SOLID); ObjectSetInteger(0,vlinename,OBJPROP_SELECTED,false); ObjectSetInteger(0,vlinename,OBJPROP_SELECTABLE,false); } NavigateToSimulationPosition(); SetChartMinMax();} }//end of HideBars function void SetChartMinMax(){ int firstbar = WindowFirstVisibleBar(); int lastbar = SimulationPosition(); int lastbarwhenscrolled = WindowFirstVisibleBar()-WindowBarsPerChart(); if (lastbarwhenscrolled>lastbar){lastbar=lastbarwhenscrolled;} double highest = High[iHighest(_Symbol,_Period,MODE_HIGH,firstbar-lastbar,lastbar)]; double lowest = Low[iLowest(_Symbol,_Period,MODE_LOW,firstbar-lastbar,lastbar)]; ChartSetInteger(0,CHART_SCALEFIX,true); ChartSetDouble(0,CHART_FIXED_MAX,highest+vertical_margin*_Point); ChartSetDouble(0,CHART_FIXED_MIN,lowest-vertical_margin*_Point); } void LabelCreate(string labelname, string labeltext, int row, int column, color labelcolor){ int ylocation = row*18; int xlocation = column*10; ObjectCreate(0,labelname,OBJ_LABEL,0,0,0); ObjectSetString(0,labelname,OBJPROP_TEXT,labeltext); ObjectSetInteger(0,labelname,OBJPROP_COLOR,labelcolor); ObjectSetInteger(0,labelname,OBJPROP_FONTSIZE,10); ObjectSetInteger(0,labelname,OBJPROP_ZORDER,10); ObjectSetInteger(0,labelname,OBJPROP_BACK,false); ObjectSetInteger(0,labelname,OBJPROP_CORNER,CORNER_LEFT_UPPER); ObjectSetInteger(0,labelname,OBJPROP_ANCHOR,ANCHOR_LEFT_UPPER); ObjectSetInteger(0,labelname,OBJPROP_XDISTANCE,xlocation); ObjectSetInteger(0,labelname,OBJPROP_YDISTANCE,ylocation);} double GetHLinePrice(string name){ return ObjectGetDouble(0,name,OBJPROP_PRICE,0); } void CreateHLine(int chartid, string objectnamey, double objectprice, color linecolor, int width, int zorder, bool back, bool selected, bool selectable, string descriptionn) { ObjectDelete(chartid,objectnamey); ObjectCreate(chartid,objectnamey,OBJ_HLINE,0,0,objectprice); ObjectSetString(chartid,objectnamey,OBJPROP_TEXT,objectprice); ObjectSetInteger(chartid,objectnamey,OBJPROP_COLOR,linecolor); ObjectSetInteger(chartid,objectnamey,OBJPROP_WIDTH,width); ObjectSetInteger(chartid,objectnamey,OBJPROP_ZORDER,zorder); ObjectSetInteger(chartid,objectnamey,OBJPROP_BACK,back); ObjectSetInteger(chartid,objectnamey,OBJPROP_SELECTED,selected); ObjectSetInteger(chartid,objectnamey,OBJPROP_SELECTABLE,selectable); ObjectSetString(0,objectnamey,OBJPROP_TEXT,descriptionn); } //end of code 
submitted by Learning_2 to Forex [link] [comments]

Looking for feedback/marketing advice/people willing to test out a windows app i'm making for backtesting

Hi all, a trader friend convinced me to try building an app to automatically download historical forex data for backtesting purposes. It lets you specify what symbols you're interested in, and tries to get 9 years of data, automatically updating it into excel files (one per day plus a few files with a year, 2 years, 5, etc). Would love someone to check it out and let me know if it works and any suggestions for marketing it! I'm not a software company, just a developer.
FWIW I asked the mods for permission first!
submitted by chrisfromsydney to ASX_Bets [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to algotrading [link] [comments]

Former investment bank FX trader: Risk management part 3/3

Former investment bank FX trader: Risk management part 3/3
Welcome to the third and final part of this chapter.
Thank you all for the 100s of comments and upvotes - maybe this post will take us above 1,000 for this topic!
Keep any feedback or questions coming in the replies below.
Before you read this note, please start with Part I and then Part II so it hangs together and makes sense.
Part III
  • Squeezes and other risks
  • Market positioning
  • Bet correlation
  • Crap trades, timeouts and monthly limits

Squeezes and other risks

We are going to cover three common risks that traders face: events; squeezes, asymmetric bets.

Events

Economic releases can cause large short-term volatility. The most famous is Non Farm Payrolls, which is the most widely watched measure of US employment levels and affects the price of many instruments.On an NFP announcement currencies like EURUSD might jump (or drop) 100 pips no problem.
This is fine and there are trading strategies that one may employ around this but the key thing is to be aware of these releases.You can find economic calendars all over the internet - including on this site - and you need only check if there are any major releases each day or week.
For example, if you are trading off some intraday chart and scalping a few pips here and there it would be highly sensible to go into a known data release flat as it is pure coin-toss and not the reason for your trading. It only takes five minutes each day to plan for the day ahead so do not get caught out by this. Many retail traders get stopped out on such events when price volatility is at its peak.

Squeezes

Short squeezes bring a lot of danger and perhaps some opportunity.
The story of VW and Porsche is the best short squeeze ever. Throughout these articles we've used FX examples wherever possible but in this one instance the concept (which is also highly relevant in FX) is best illustrated with an historical lesson from a different asset class.
A short squeeze is when a participant ends up in a short position they are forced to cover. Especially when the rest of the market knows that this participant can be bullied into stopping out at terrible levels, provided the market can briefly drive the price into their pain zone.

There's a reason for the car, don't worry
Hedge funds had been shorting VW stock. However the amount of VW stock available to buy in the open market was actually quite limited. The local government owned a chunk and Porsche itself had bought and locked away around 30%. Neither of these would sell to the hedge-funds so a good amount of the stock was un-buyable at any price.
If you sell or short a stock you must be prepared to buy it back to go flat at some point.
To cut a long story short, Porsche bought a lot of call options on VW stock. These options gave them the right to purchase VW stock from banks at slightly above market price.
Eventually the banks who had sold these options realised there was no VW stock to go out and buy since the German government wouldn’t sell its allocation and Porsche wouldn’t either. If Porsche called in the options the banks were in trouble.
Porsche called in the options which forced the shorts to buy stock - at whatever price they could get it.
The price squeezed higher as those that were short got massively squeezed and stopped out. For one brief moment in 2008, VW was the world’s most valuable company. Shorts were burned hard.

Incredible event
Porsche apparently made $11.5 billion on the trade. The BBC described Porsche as “a hedge fund with a carmaker attached.”
If this all seems exotic then know that the same thing happens in FX all the time. If everyone in the market is talking about a key level in EURUSD being 1.2050 then you can bet the market will try to push through 1.2050 just to take out any short stops at that level. Whether it then rallies higher or fails and trades back lower is a different matter entirely.
This brings us on to the matter of crowded trades. We will look at positioning in more detail in the next section. Crowded trades are dangerous for PNL. If everyone believes EURUSD is going down and has already sold EURUSD then you run the risk of a short squeeze.
For additional selling to take place you need a very good reason for people to add to their position whereas a move in the other direction could force mass buying to cover their shorts.
A trading mentor when I worked at the investment bank once advised me:
Always think about which move would cause the maximum people the maximum pain. That move is precisely what you should be watching out for at all times.

Asymmetric losses

Also known as picking up pennies in front of a steamroller. This risk has caught out many a retail trader. Sometimes it is referred to as a "negative skew" strategy.
Ideally what you are looking for is asymmetric risk trade set-ups: that is where the downside is clearly defined and smaller than the upside. What you want to avoid is the opposite.
A famous example of this going wrong was the Swiss National Bank de-peg in 2012.
The Swiss National Bank had said they would defend the price of EURCHF so that it did not go below 1.2. Many people believed it could never go below 1.2 due to this. Many retail traders therefore opted for a strategy that some describe as ‘picking up pennies in front of a steam-roller’.
They would would buy EURCHF above the peg level and hope for a tiny rally of several pips before selling them back and keep doing this repeatedly. Often they were highly leveraged at 100:1 so that they could amplify the profit of the tiny 5-10 pip rally.
Then this happened.

Something that changed FX markets forever
The SNB suddenly did the unthinkable. They stopped defending the price. CHF jumped and so EURCHF (the number of CHF per 1 EUR) dropped to new lows very fast. Clearly, this trade had horrific risk : reward asymmetry: you risked 30% to make 0.05%.
Other strategies like naively selling options have the same result. You win a small amount of money each day and then spectacularly blow up at some point down the line.

Market positioning

We have talked about short squeezes. But how do you know what the market position is? And should you care?
Let’s start with the first. You should definitely care.
Let’s imagine the entire market is exceptionally long EURUSD and positioning reaches extreme levels. This makes EURUSD very vulnerable.
To keep the price going higher EURUSD needs to attract fresh buy orders. If everyone is already long and has no room to add, what can incentivise people to keep buying? The news flow might be good. They may believe EURUSD goes higher. But they have already bought and have their maximum position on.
On the flip side, if there’s an unexpected event and EURUSD gaps lower you will have the entire market trying to exit the position at the same time. Like a herd of cows running through a single doorway. Messy.
We are going to look at this in more detail in a later chapter, where we discuss ‘carry’ trades. For now this TRYJPY chart might provide some idea of what a rush to the exits of a crowded position looks like.

A carry trade position clear-out in action
Knowing if the market is currently at extreme levels of long or short can therefore be helpful.
The CFTC makes available a weekly report, which details the overall positions of speculative traders “Non Commercial Traders” in some of the major futures products. This includes futures tied to deliverable FX pairs such as EURUSD as well as products such as gold. The report is called “CFTC Commitments of Traders” ("COT").
This is a great benchmark. It is far more representative of the overall market than the proprietary ones offered by retail brokers as it covers a far larger cross-section of the institutional market.
Generally market participants will not pay a lot of attention to commercial hedgers, which are also detailed in the report. This data is worth tracking but these folks are simply hedging real-world transactions rather than speculating so their activity is far less revealing and far more noisy.
You can find the data online for free and download it directly here.

Raw format is kinda hard to work with

However, many websites will chart this for you free of charge and you may find it more convenient to look at it that way. Just google “CFTC positioning charts”.

But you can easily get visualisations
You can visually spot extreme positioning. It is extremely powerful.
Bear in mind the reports come out Friday afternoon US time and the report is a snapshot up to the prior Tuesday. That means it is a lagged report - by the time it is released it is a few days out of date. For longer term trades where you hold positions for weeks this is of course still pretty helpful information.
As well as the absolute level (is the speculative market net long or short) you can also use this to pick up on changes in positioning.
For example if bad news comes out how much does the net short increase? If good news comes out, the market may remain net short but how much did they buy back?
A lot of traders ask themselves “Does the market have this trade on?” The positioning data is a good method for answering this. It provides a good finger on the pulse of the wider market sentiment and activity.
For example you might say: “There was lots of noise about the good employment numbers in the US. However, there wasn’t actually a lot of position change on the back of it. Maybe everyone who wants to buy already has. What would happen now if bad news came out?”
In general traders will be wary of entering a crowded position because it will be hard to attract additional buyers or sellers and there could be an aggressive exit.
If you want to enter a trade that is showing extreme levels of positioning you must think carefully about this dynamic.

Bet correlation

Retail traders often drastically underestimate how correlated their bets are.
Through bitter experience, I have learned that a mistake in position correlation is the root of some of the most serious problems in trading. If you have eight highly correlated positions, then you are really trading one position that is eight times as large.
Bruce Kovner of hedge fund, Caxton Associates
For example, if you are trading a bunch of pairs against the USD you will end up with a simply huge USD exposure. A single USD-trigger can ruin all your bets. Your ideal scenario — and it isn’t always possible — would be to have a highly diversified portfolio of bets that do not move in tandem.
Look at this chart. Inverted USD index (DXY) is green. AUDUSD is orange. EURUSD is blue.

Chart from TradingView
So the whole thing is just one big USD trade! If you are long AUDUSD, long EURUSD, and short DXY you have three anti USD bets that are all likely to work or fail together.
The more diversified your portfolio of bets are, the more risk you can take on each.
There’s a really good video, explaining the benefits of diversification from Ray Dalio.
A systematic fund with access to an investable universe of 10,000 instruments has more opportunity to make a better risk-adjusted return than a trader who only focuses on three symbols. Diversification really is the closest thing to a free lunch in finance.
But let’s be pragmatic and realistic. Human retail traders don’t have capacity to run even one hundred bets at a time. More realistic would be an average of 2-3 trades on simultaneously. So what can be done?
For example:
  • You might diversify across time horizons by having a mix of short-term and long-term trades.
  • You might diversify across asset classes - trading some FX but also crypto and equities.
  • You might diversify your trade generation approach so you are not relying on the same indicators or drivers on each trade.
  • You might diversify your exposure to the market regime by having some trades that assume a trend will continue (momentum) and some that assume we will be range-bound (carry).
And so on. Basically you want to scan your portfolio of trades and make sure you are not putting all your eggs in one basket. If some trades underperform others will perform - assuming the bets are not correlated - and that way you can ensure your overall portfolio takes less risk per unit of return.
The key thing is to start thinking about a portfolio of bets and what each new trade offers to your existing portfolio of risk. Will it diversify or amplify a current exposure?

Crap trades, timeouts and monthly limits

One common mistake is to get bored and restless and put on crap trades. This just means trades in which you have low conviction.
It is perfectly fine not to trade. If you feel like you do not understand the market at a particular point, simply choose not to trade.
Flat is a position.
Do not waste your bullets on rubbish trades. Only enter a trade when you have carefully considered it from all angles and feel good about the risk. This will make it far easier to hold onto the trade if it moves against you at any point. You actually believe in it.
Equally, you need to set monthly limits. A standard limit might be a 10% account balance stop per month. At that point you close all your positions immediately and stop trading till next month.

Be strict with yourself and walk away
Let’s assume you started the year with $100k and made 5% in January so enter Feb with $105k balance. Your stop is therefore 10% of $105k or $10.5k . If your account balance dips to $94.5k ($105k-$10.5k) then you stop yourself out and don’t resume trading till March the first.
Having monthly calendar breaks is nice for another reason. Say you made a load of money in January. You don’t want to start February feeling you are up 5% or it is too tempting to avoid trading all month and protect the existing win. Each month and each year should feel like a clean slate and an independent period.
Everyone has trading slumps. It is perfectly normal. It will definitely happen to you at some stage. The trick is to take a break and refocus. Conserve your capital by not trading a lot whilst you are on a losing streak. This period will be much harder for you emotionally and you’ll end up making suboptimal decisions. An enforced break will help you see the bigger picture.
Put in place a process before you start trading and then it’ll be easy to follow and will feel much less emotional. Remember: the market doesn’t care if you win or lose, it is nothing personal.
When your head has cooled and you feel calm you return the next month and begin the task of building back your account balance.

That's a wrap on risk management

Thanks for taking time to read this three-part chapter on risk management. I hope you enjoyed it. Do comment in the replies if you have any questions or feedback.
Remember: the most important part of trading is not making money. It is not losing money. Always start with that principle. I hope these three notes have provided some food for thought on how you might approach risk management and are of practical use to you when trading. Avoiding mistakes is not a sexy tagline but it is an effective and reliable way to improve results.
Next up I will be writing about an exciting topic I think many traders should look at rather differently: news trading. Please follow on here to receive notifications and the broad outline is below.
News Trading Part I
  • Introduction
  • Why use the economic calendar
  • Reading the economic calendar
  • Knowing what's priced in
  • Surveys
  • Interest rates
  • First order thinking vs second order thinking
News Trading Part II
  • Preparing for quantitative and qualitative releases
  • Data surprise index
  • Using recent events to predict future reactions
  • Buy the rumour, sell the fact
  • The mysterious 'position trim' effect
  • Reversals
  • Some key FX releases
***

Disclaimer:This content is not investment advice and you should not place any reliance on it. The views expressed are the author's own and should not be attributed to any other person, including their employer.
submitted by getmrmarket to Forex [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means the MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to Forex [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to quant [link] [comments]

No, the British did not steal $45 trillion from India

This is an updated copy of the version on BadHistory. I plan to update it in accordance with the feedback I got.
I'd like to thank two people who will remain anonymous for helping me greatly with this post (you know who you are)
Three years ago a festschrift for Binay Bhushan Chaudhuri was published by Shubhra Chakrabarti, a history teacher at the University of Delhi and Utsa Patnaik, a Marxist economist who taught at JNU until 2010.
One of the essays in the festschirt by Utsa Patnaik was an attempt to quantify the "drain" undergone by India during British Rule. Her conclusion? Britain robbed India of $45 trillion (or £9.2 trillion) during their 200 or so years of rule. This figure was immensely popular, and got republished in several major news outlets (here, here, here, here (they get the number wrong) and more recently here), got a mention from the Minister of External Affairs & returns 29,100 results on Google. There's also plenty of references to it here on Reddit.
Patnaik is not the first to calculate such a figure. Angus Maddison thought it was £100 million, Simon Digby said £1 billion, Javier Estaban said £40 million see Roy (2019). The huge range of figures should set off some alarm bells.
So how did Patnaik calculate this (shockingly large) figure? Well, even though I don't have access to the festschrift, she conveniently has written an article detailing her methodology here. Let's have a look.
How exactly did the British manage to diddle us and drain our wealth’ ? was the question that Basudev Chatterjee (later editor of a volume in the Towards Freedom project) had posed to me 50 years ago when we were fellow-students abroad.
This is begging the question.
After decades of research I find that using India’s commodity export surplus as the measure and applying an interest rate of 5%, the total drain from 1765 to 1938, compounded up to 2016, comes to £9.2 trillion; since $4.86 exchanged for £1 those days, this sum equals about $45 trillion.
This is completely meaningless. To understand why it's meaningless consider India's annual coconut exports. These are almost certainly a surplus but the surplus in trade is countered by the other country buying the product (indeed, by definition, trade surpluses contribute to the GDP of a nation which hardly plays into intuitive conceptualisations of drain).
Furthermore, Dewey (2019) critiques the 5% interest rate.
She [Patnaik] consistently adopts statistical assumptions (such as compound interest at a rate of 5% per annum over centuries) that exaggerate the magnitude of the drain
Moving on:
The exact mechanism of drain, or transfers from India to Britain was quite simple.
Convenient.
Drain theory possessed the political merit of being easily grasped by a nation of peasants. [...] No other idea could arouse people than the thought that they were being taxed so that others in far off lands might live in comfort. [...] It was, therefore, inevitable that the drain theory became the main staple of nationalist political agitation during the Gandhian era.
- Chandra et al. (1989)
The key factor was Britain’s control over our taxation revenues combined with control over India’s financial gold and forex earnings from its booming commodity export surplus with the world. Simply put, Britain used locally raised rupee tax revenues to pay for its net import of goods, a highly abnormal use of budgetary funds not seen in any sovereign country.
The issue with figures like these is they all make certain methodological assumptions that are impossible to prove. From Roy in Frankema et al. (2019):
the "drain theory" of Indian poverty cannot be tested with evidence, for several reasons. First, it rests on the counterfactual that any money saved on account of factor payments abroad would translate into domestic investment, which can never be proved. Second, it rests on "the primitive notion that all payments to foreigners are "drain"", that is, on the assumption that these payments did not contribute to domestic national income to the equivalent extent (Kumar 1985, 384; see also Chaudhuri 1968). Again, this cannot be tested. [...] Fourth, while British officers serving India did receive salaries that were many times that of the average income in India, a paper using cross-country data shows that colonies with better paid officers were governed better (Jones 2013).
Indeed, drain theory rests on some very weak foundations. This, in of itself, should be enough to dismiss any of the other figures that get thrown out. Nonetheless, I felt it would be a useful exercise to continue exploring Patnaik's take on drain theory.
The East India Company from 1765 onwards allocated every year up to one-third of Indian budgetary revenues net of collection costs, to buy a large volume of goods for direct import into Britain, far in excess of that country’s own needs.
So what's going on here? Well Roy (2019) explains it better:
Colonial India ran an export surplus, which, together with foreign investment, was used to pay for services purchased from Britain. These payments included interest on public debt, salaries, and pensions paid to government offcers who had come from Britain, salaries of managers and engineers, guaranteed profts paid to railway companies, and repatriated business profts. How do we know that any of these payments involved paying too much? The answer is we do not.
So what was really happening is the government was paying its workers for services (as well as guaranteeing profits - to promote investment - something the GoI does today Dalal (2019), and promoting business in India), and those workers were remitting some of that money to Britain. This is hardly a drain (unless, of course, Indian diaspora around the world today are "draining" it). In some cases, the remittances would take the form of goods (as described) see Chaudhuri (1983):
It is obvious that these debit items were financed through the export surplus on merchandise account, and later, when railway construction started on a large scale in India, through capital import. Until 1833 the East India Company followed a cumbersome method in remitting the annual home charges. This was to purchase export commodities in India out of revenue, which were then shipped to London and the proceeds from their sale handed over to the home treasury.
While Roy's earlier point argues better paid officers governed better, it is honestly impossible to say what part of the repatriated export surplus was a drain, and what was not. However calling all of it a drain is definitely misguided.
It's worth noting that Patnaik seems to make no attempt to quantify the benefits of the Raj either, Dewey (2019)'s 2nd criticism:
she [Patnaik] consistently ignores research that would tend to cut the economic impact of the drain down to size, such as the work on the sources of investment during the industrial revolution (which shows that industrialisation was financed by the ploughed-back profits of industrialists) or the costs of empire school (which stresses the high price of imperial defence)

Since tropical goods were highly prized in other cold temperate countries which could never produce them, in effect these free goods represented international purchasing power for Britain which kept a part for its own use and re-exported the balance to other countries in Europe and North America against import of food grains, iron and other goods in which it was deficient.
Re-exports necessarily adds value to goods when the goods are processed and when the goods are transported. The country with the largest navy at the time would presumably be in very good stead to do the latter.
The British historians Phyllis Deane and WA Cole presented an incorrect estimate of Britain’s 18th-19th century trade volume, by leaving out re-exports completely. I found that by 1800 Britain’s total trade was 62% higher than their estimate, on applying the correct definition of trade including re-exports, that is used by the United Nations and by all other international organisations.
While interesting, and certainly expected for such an old book, re-exporting necessarily adds value to goods.
When the Crown took over from the Company, from 1861 a clever system was developed under which all of India’s financial gold and forex earnings from its fast-rising commodity export surplus with the world, was intercepted and appropriated by Britain. As before up to a third of India’s rising budgetary revenues was not spent domestically but was set aside as ‘expenditure abroad’.
So, what does this mean? Britain appropriated all of India's earnings, and then spent a third of it aboard? Not exactly. She is describing home charges see Roy (2019) again:
Some of the expenditures on defense and administration were made in sterling and went out of the country. This payment by the government was known as the Home Charges. For example, interest payment on loans raised to finance construction of railways and irrigation works, pensions paid to retired officers, and purchase of stores, were payments in sterling. [...] almost all money that the government paid abroad corresponded to the purchase of a service from abroad. [...] The balance of payments system that emerged after 1800 was based on standard business principles. India bought something and paid for it. State revenues were used to pay for wages of people hired abroad, pay for interest on loans raised abroad, and repatriation of profits on foreign investments coming into India. These were legitimate market transactions.
Indeed, if paying for what you buy is drain, then several billions of us are drained every day.
The Secretary of State for India in Council, based in London, invited foreign importers to deposit with him the payment (in gold, sterling and their own currencies) for their net imports from India, and these gold and forex payments disappeared into the yawning maw of the SoS’s account in the Bank of England.
It should be noted that India having two heads was beneficial, and encouraged investment per Roy (2019):
The fact that the India Office in London managed a part of the monetary system made India creditworthy, stabilized its currency, and encouraged foreign savers to put money into railways and private enterprise in India. Current research on the history of public debt shows that stable and large colonies found it easier to borrow abroad than independent economies because the investors trusted the guarantee of the colonist powers.

Against India’s net foreign earnings he issued bills, termed Council bills (CBs), to an equivalent rupee value. The rate (between gold-linked sterling and silver rupee) at which the bills were issued, was carefully adjusted to the last farthing, so that foreigners would never find it more profitable to ship financial gold as payment directly to Indians, compared to using the CB route. Foreign importers then sent the CBs by post or by telegraph to the export houses in India, that via the exchange banks were paid out of the budgeted provision of sums under ‘expenditure abroad’, and the exporters in turn paid the producers (peasants and artisans) from whom they sourced the goods.
Sunderland (2013) argues CBs had two main roles (and neither were part of a grand plot to keep gold out of India):
Council bills had two roles. They firstly promoted trade by handing the IO some control of the rate of exchange and allowing the exchange banks to remit funds to India and to hedge currency transaction risks. They also enabled the Indian government to transfer cash to England for the payment of its UK commitments.

The United Nations (1962) historical data for 1900 to 1960, show that for three decades up to 1928 (and very likely earlier too) India posted the second highest merchandise export surplus in the world, with USA in the first position. Not only were Indians deprived of every bit of the enormous international purchasing power they had earned over 175 years, even its rupee equivalent was not issued to them since not even the colonial government was credited with any part of India’s net gold and forex earnings against which it could issue rupees. The sleight-of-hand employed, namely ‘paying’ producers out of their own taxes, made India’s export surplus unrequited and constituted a tax-financed drain to the metropolis, as had been correctly pointed out by those highly insightful classical writers, Dadabhai Naoroji and RCDutt.
It doesn't appear that others appreciate their insight Roy (2019):
K. N. Chaudhuri rightly calls such practice ‘confused’ economics ‘coloured by political feelings’.

Surplus budgets to effect such heavy tax-financed transfers had a severe employment–reducing and income-deflating effect: mass consumption was squeezed in order to release export goods. Per capita annual foodgrains absorption in British India declined from 210 kg. during the period 1904-09, to 157 kg. during 1937-41, and to only 137 kg by 1946.
Dewey (1978) points out reliability issues with Indian agriculutural statistics, however this calorie decline persists to this day. Some of it is attributed to less food being consumed at home Smith (2015), a lower infectious disease burden Duh & Spears (2016) and diversified diets Vankatesh et al. (2016).
If even a part of its enormous foreign earnings had been credited to it and not entirely siphoned off, India could have imported modern technology to build up an industrial structure as Japan was doing.
This is, unfortunately, impossible to prove. Had the British not arrived in India, there is no clear indication that India would've united (this is arguably more plausible than the given counterfactual1). Had the British not arrived in India, there is no clear indication India would not have been nuked in WW2, much like Japan. Had the British not arrived in India, there is no clear indication India would not have been invaded by lizard people, much like Japan. The list continues eternally.
Nevertheless, I will charitably examine the given counterfactual anyway. Did pre-colonial India have industrial potential? The answer is a resounding no.
From Gupta (1980):
This article starts from the premise that while economic categories - the extent of commodity production, wage labour, monetarisation of the economy, etc - should be the basis for any analysis of the production relations of pre-British India, it is the nature of class struggles arising out of particular class alignments that finally gives the decisive twist to social change. Arguing on this premise, and analysing the available evidence, this article concludes that there was little potential for industrial revolution before the British arrived in India because, whatever might have been the character of economic categories of that period, the class relations had not sufficiently matured to develop productive forces and the required class struggle for a 'revolution' to take place.
A view echoed in Raychaudhuri (1983):
Yet all of this did not amount to an economic situation comparable to that of western Europe on the eve of the industrial revolution. Her technology - in agriculture as well as manufacturers - had by and large been stagnant for centuries. [...] The weakness of the Indian economy in the mid-eighteenth century, as compared to pre-industrial Europe was not simply a matter of technology and commercial and industrial organization. No scientific or geographical revolution formed part of the eighteenth-century Indian's historical experience. [...] Spontaneous movement towards industrialisation is unlikely in such a situation.
So now we've established India did not have industrial potential, was India similar to Japan just before the Meiji era? The answer, yet again, unsurprisingly, is no. Japan's economic situation was not comparable to India's, which allowed for Japan to finance its revolution. From Yasuba (1986):
All in all, the Japanese standard of living may not have been much below the English standard of living before industrialization, and both of them may have been considerably higher than the Indian standard of living. We can no longer say that Japan started from a pathetically low economic level and achieved a rapid or even "miraculous" economic growth. Japan's per capita income was almost as high as in Western Europe before industrialization, and it was possible for Japan to produce surplus in the Meiji Period to finance private and public capital formation.
The circumstances that led to Meiji Japan were extremely unique. See Tomlinson (1985):
Most modern comparisons between India and Japan, written by either Indianists or Japanese specialists, stress instead that industrial growth in Meiji Japan was the product of unique features that were not reproducible elsewhere. [...] it is undoubtably true that Japan's progress to industrialization has been unique and unrepeatable
So there you have it. Unsubstantiated statistical assumptions, calling any number you can a drain & assuming a counterfactual for no good reason gets you this $45 trillion number. Hopefully that's enough to bury it in the ground.
1. Several authors have affirmed that Indian identity is a colonial artefact. For example see Rajan 1969:
Perhaps the single greatest and most enduring impact of British rule over India is that it created an Indian nation, in the modern political sense. After centuries of rule by different dynasties overparts of the Indian sub-continent, and after about 100 years of British rule, Indians ceased to be merely Bengalis, Maharashtrians,or Tamils, linguistically and culturally.
or see Bryant 2000:
But then, it would be anachronistic to condemn eighteenth-century Indians, who served the British, as collaborators, when the notion of 'democratic' nationalism or of an Indian 'nation' did not then exist. [...] Indians who fought for them, differed from the Europeans in having a primary attachment to a non-belligerent religion, family and local chief, which was stronger than any identity they might have with a more remote prince or 'nation'.

Bibliography

Chakrabarti, Shubra & Patnaik, Utsa (2018). Agrarian and other histories: Essays for Binay Bhushan Chaudhuri. Colombia University Press
Hickel, Jason (2018). How the British stole $45 trillion from India. The Guardian
Bhuyan, Aroonim & Sharma, Krishan (2019). The Great Loot: How the British stole $45 trillion from India. Indiapost
Monbiot, George (2020). English Landowners have stolen our rights. It is time to reclaim them. The Guardian
Tsjeng, Zing (2020). How Britain Stole $45 trillion from India with trains | Empires of Dirt. Vice
Chaudhury, Dipanjan (2019). British looted $45 trillion from India in today’s value: Jaishankar. The Economic Times
Roy, Tirthankar (2019). How British rule changed India's economy: The Paradox of the Raj. Palgrave Macmillan
Patnaik, Utsa (2018). How the British impoverished India. Hindustan Times
Tuovila, Alicia (2019). Expenditure method. Investopedia
Dewey, Clive (2019). Changing the guard: The dissolution of the nationalist–Marxist orthodoxy in the agrarian and agricultural history of India. The Indian Economic & Social History Review
Chandra, Bipan et al. (1989). India's Struggle for Independence, 1857-1947. Penguin Books
Frankema, Ewout & Booth, Anne (2019). Fiscal Capacity and the Colonial State in Asia and Africa, c. 1850-1960. Cambridge University Press
Dalal, Sucheta (2019). IL&FS Controversy: Centre is Paying Up on Sovereign Guarantees to ADB, KfW for Group's Loan. TheWire
Chaudhuri, K.N. (1983). X - Foreign Trade and Balance of Payments (1757–1947). Cambridge University Press
Sunderland, David (2013). Financing the Raj: The City of London and Colonial India, 1858-1940. Boydell Press
Dewey, Clive (1978). Patwari and Chaukidar: Subordinate officials and the reliability of India’s agricultural statistics. Athlone Press
Smith, Lisa (2015). The great Indian calorie debate: Explaining rising undernourishment during India’s rapid economic growth. Food Policy
Duh, Josephine & Spears, Dean (2016). Health and Hunger: Disease, Energy Needs, and the Indian Calorie Consumption Puzzle. The Economic Journal
Vankatesh, P. et al. (2016). Relationship between Food Production and Consumption Diversity in India – Empirical Evidences from Cross Section Analysis. Agricultural Economics Research Review
Gupta, Shaibal (1980). Potential of Industrial Revolution in Pre-British India. Economic and Political Weekly
Raychaudhuri, Tapan (1983). I - The mid-eighteenth-century background. Cambridge University Press
Yasuba, Yasukichi (1986). Standard of Living in Japan Before Industrialization: From what Level did Japan Begin? A Comment. The Journal of Economic History
Tomblinson, B.R. (1985). Writing History Sideways: Lessons for Indian Economic Historians from Meiji Japan. Cambridge University Press
Rajan, M.S. (1969). The Impact of British Rule in India. Journal of Contemporary History
Bryant, G.J. (2000). Indigenous Mercenaries in the Service of European Imperialists: The Case of the Sepoys in the Early British Indian Army, 1750-1800. War in History
submitted by GaslightEveryone to u/GaslightEveryone [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to Daytrading [link] [comments]

Integration with Financial Excel Add-In – Excel Price Feed

Integration with Financial Excel Add-In – Excel Price Feed

https://preview.redd.it/j4acwxvwfvr51.jpg?width=1920&format=pjpg&auto=webp&s=77df789ef696a2cdecf2e3266b550083ade09d59
Today we are happy to announce an integration with the financial Excel add-in – Excel Price Feed. Excel Price Feed is easy to use and featureful add-in for Excel owned and distributed by Coderun Technologies Ltd. It was launched in early 2019 and is regularly updated with new features, for EOD Historical Data the add-in has excellent support of Fundamental and End of Day APIs.
https://preview.redd.it/c2m0g8c3gvr51.png?width=723&format=png&auto=webp&s=4968e0e7ac2d1f4f31485ac441dadacdaf7bc825
  • Excel Price Feed is an Add-in that includes 100+ new Excel formulas for live, historical, and fundamental market data.
  • Markets include stocks, stock indices, stock options, mutual funds, ETFs, forex, commodities, and cryptocurrencies.
Learn More and download the plugin on Excel Price Feed page.
Please note that you should have both subscriptions to use this plugin with our data: from EOD Historical Data and from Excel Price Feed. Our subscriptions do not include add-in licensing and it should be ordered separately.
submitted by EOD_historical_data to EODHistoricalData [link] [comments]

Conflicting BTCUSDT historical Data from Pinned Post

Hi all. I followed the pinned instructions on how to download historical btc data, but I am seeing a discrepancy. I pulled minute data from August and compare recent ticks to binanance.com and the data is different as you can see in the screenshot below. Has anyone experience this before?

https://preview.redd.it/c1cdrfni1ng51.png?width=1048&format=png&auto=webp&s=13d6e884cee0a9e40367fd474060fac9a5d681d6
submitted by RobsRemarks to algotrading [link] [comments]

Hibiscus Petroleum Berhad (5199.KL)


https://preview.redd.it/gp18bjnlabr41.jpg?width=768&format=pjpg&auto=webp&s=6054e7f52e8d52da403016139ae43e0e799abf15
Download PDF of this article here: https://docdro.id/6eLgUPo
In light of the recent fall in oil prices due to the Saudi-Russian dispute and dampening demand for oil due to the lockdowns implemented globally, O&G stocks have taken a severe beating, falling approximately 50% from their highs at the beginning of the year. Not spared from this onslaught is Hibiscus Petroleum Berhad (Hibiscus), a listed oil and gas (O&G) exploration and production (E&P) company.
Why invest in O&G stocks in this particularly uncertain period? For one, valuations of these stocks have fallen to multi-year lows, bringing the potential ROI on these stocks to attractive levels. Oil prices are cyclical, and are bound to return to the mean given a sufficiently long time horizon. The trick is to find those companies who can survive through this downturn and emerge into “normal” profitability once oil prices rebound.
In this article, I will explore the upsides and downsides of investing in Hibiscus. I will do my best to cater this report to newcomers to the O&G industry – rather than address exclusively experts and veterans of the O&G sector. As an equity analyst, I aim to provide a view on the company primarily, and will generally refrain from providing macro views on oil or opinions about secular trends of the sector. I hope you enjoy reading it!
Stock code: 5199.KL
Stock name: Hibiscus Petroleum Berhad
Financial information and financial reports: https://www.malaysiastock.biz/Corporate-Infomation.aspx?securityCode=5199
Company website: https://www.hibiscuspetroleum.com/

Company Snapshot

Hibiscus Petroleum Berhad (5199.KL) is an oil and gas (O&G) upstream exploration and production (E&P) company located in Malaysia. As an E&P company, their business can be basically described as:
· looking for oil,
· drawing it out of the ground, and
· selling it on global oil markets.
This means Hibiscus’s profits are particularly exposed to fluctuating oil prices. With oil prices falling to sub-$30 from about $60 at the beginning of the year, Hibiscus’s stock price has also fallen by about 50% YTD – from around RM 1.00 to RM 0.45 (as of 5 April 2020).
https://preview.redd.it/3dqc4jraabr41.png?width=641&format=png&auto=webp&s=7ba0e8614c4e9d781edfc670016a874b90560684
https://preview.redd.it/lvdkrf0cabr41.png?width=356&format=png&auto=webp&s=46f250a713887b06986932fa475dc59c7c28582e
While the company is domiciled in Malaysia, its two main oil producing fields are located in both Malaysia and the UK. The Malaysian oil field is commonly referred to as the North Sabah field, while the UK oil field is commonly referred to as the Anasuria oil field. Hibiscus has licenses to other oil fields in different parts of the world, notably the Marigold/Sunflower oil fields in the UK and the VIC cluster in Australia, but its revenues and profits mainly stem from the former two oil producing fields.
Given that it’s a small player and has only two primary producing oil fields, it’s not surprising that Hibiscus sells its oil to a concentrated pool of customers, with 2 of them representing 80% of its revenues (i.e. Petronas and BP). Fortunately, both these customers are oil supermajors, and are unlikely to default on their obligations despite low oil prices.
At RM 0.45 per share, the market capitalization is RM 714.7m and it has a trailing PE ratio of about 5x. It doesn’t carry any debt, and it hasn’t paid a dividend in its listing history. The MD, Mr. Kenneth Gerard Pereira, owns about 10% of the company’s outstanding shares.

Reserves (Total recoverable oil) & Production (bbl/day)

To begin analyzing the company, it’s necessary to understand a little of the industry jargon. We’ll start with Reserves and Production.
In general, there are three types of categories for a company’s recoverable oil volumes – Reserves, Contingent Resources and Prospective Resources. Reserves are those oil fields which are “commercial”, which is defined as below:
As defined by the SPE PRMS, Reserves are “… quantities of petroleum anticipated to be commercially recoverable by application of development projects to known accumulations from a given date forward under defined conditions.” Therefore, Reserves must be discovered (by drilling, recoverable (with current technology), remaining in the subsurface (at the effective date of the evaluation) and “commercial” based on the development project proposed.)
Note that Reserves are associated with development projects. To be considered as “commercial”, there must be a firm intention to proceed with the project in a reasonable time frame (typically 5 years, and such intention must be based upon all of the following criteria:)
- A reasonable assessment of the future economics of the development project meeting defined investment and operating criteria; - A reasonable expectation that there will be a market for all or at least the expected sales quantities of production required to justify development; - Evidence that the necessary production and transportation facilities are available or can be made available; and - Evidence that legal, contractual, environmental and other social and economic concerns will allow for the actual implementation of the recovery project being evaluated.
Contingent Resources and Prospective Resources are further defined as below:
- Contingent Resources: potentially recoverable volumes associated with a development plan that targets discovered volumes but is not (yet commercial (as defined above); and) - Prospective Resources: potentially recoverable volumes associated with a development plan that targets as yet undiscovered volumes.
In the industry lingo, we generally refer to Reserves as ‘P’ and Contingent Resources as ‘C’. These ‘P’ and ‘C’ resources can be further categorized into 1P/2P/3P resources and 1C/2C/3C resources, each referring to a low/medium/high estimate of the company’s potential recoverable oil volumes:
- Low/1C/1P estimate: there should be reasonable certainty that volumes actually recovered will equal or exceed the estimate; - Best/2C/2P estimate: there should be an equal likelihood of the actual volumes of petroleum being larger or smaller than the estimate; and - High/3C/3P estimate: there is a low probability that the estimate will be exceeded.
Hence in the E&P industry, it is easy to see why most investors and analysts refer to the 2P estimate as the best estimate for a company’s actual recoverable oil volumes. This is because 2P reserves (‘2P’ referring to ‘Proved and Probable’) are a middle estimate of the recoverable oil volumes legally recognized as “commercial”.
However, there’s nothing stopping you from including 2C resources (riskier) or utilizing 1P resources (conservative) as your estimate for total recoverable oil volumes, depending on your risk appetite. In this instance, the company has provided a snapshot of its 2P and 2C resources in its analyst presentation:
https://preview.redd.it/o8qejdyc8br41.png?width=710&format=png&auto=webp&s=b3ab9be8f83badf0206adc982feda3a558d43e78
Basically, what the company is saying here is that by 2021, it will have classified as 2P reserves at least 23.7 million bbl from its Anasuria field and 20.5 million bbl from its North Sabah field – for total 2P reserves of 44.2 million bbl (we are ignoring the Australian VIC cluster as it is only estimated to reach first oil by 2022).
Furthermore, the company is stating that they have discovered (but not yet legally classified as “commercial”) a further 71 million bbl of oil from both the Anasuria and North Sabah fields, as well as the Marigold/Sunflower fields. If we include these 2C resources, the total potential recoverable oil volumes could exceed 100 million bbl.
In this report, we shall explore all valuation scenarios giving consideration to both 2P and 2C resources.
https://preview.redd.it/gk54qplf8br41.png?width=489&format=png&auto=webp&s=c905b7a6328432218b5b9dfd53cc9ef1390bd604
The company further targets a 2021 production rate of 20,000 bbl (LTM: 8,000 bbl), which includes 5,000 bbl from its Anasuria field (LTM: 2,500 bbl) and 7,000 bbl from its North Sabah field (LTM: 5,300 bbl).
This is a substantial increase in forecasted production from both existing and prospective oil fields. If it materializes, annual production rate could be as high as 7,300 mmbbl, and 2021 revenues (given FY20 USD/bbl of $60) could exceed RM 1.5 billion (FY20: RM 988 million).
However, this targeted forecast is quite a stretch from current production levels. Nevertheless, we shall consider all provided information in estimating a valuation for Hibiscus.
To understand Hibiscus’s oil production capacity and forecast its revenues and profits, we need to have a better appreciation of the performance of its two main cash-generating assets – the North Sabah field and the Anasuria field.

North Sabah oil field
https://preview.redd.it/62nssexj8br41.png?width=1003&format=png&auto=webp&s=cd78f86d51165fb9a93015e49496f7f98dad64dd
Hibiscus owns a 50% interest in the North Sabah field together with its partner Petronas, and has production rights over the field up to year 2040. The asset contains 4 oil fields, namely the St Joseph field, South Furious field, SF 30 field and Barton field.
For the sake of brevity, we shall not delve deep into the operational aspects of the fields or the contractual nature of its production sharing contract (PSC). We’ll just focus on the factors which relate to its financial performance. These are:
· Average uptime
· Total oil sold
· Average realized oil price
· Average OPEX per bbl
With regards to average uptime, we can see that the company maintains relative high facility availability, exceeding 90% uptime in all quarters of the LTM with exception of Jul-Sep 2019. The dip in average uptime was due to production enhancement projects and maintenance activities undertaken to improve the production capacity of the St Joseph and SF30 oil fields.
Hence, we can conclude that management has a good handle on operational performance. It also implies that there is little room for further improvement in production resulting from increased uptime.
As North Sabah is under a production sharing contract (PSC), there is a distinction between gross oil production and net oil production. The former relates to total oil drawn out of the ground, whereas the latter refers to Hibiscus’s share of oil production after taxes, royalties and expenses are accounted for. In this case, we want to pay attention to net oil production, not gross.
We can arrive at Hibiscus’s total oil sold for the last twelve months (LTM) by adding up the total oil sold for each of the last 4 quarters. Summing up the figures yields total oil sold for the LTM of approximately 2,075,305 bbl.
Then, we can arrive at an average realized oil price over the LTM by averaging the average realized oil price for the last 4 quarters, giving us an average realized oil price over the LTM of USD 68.57/bbl. We can do the same for average OPEX per bbl, giving us an average OPEX per bbl over the LTM of USD 13.23/bbl.
Thus, we can sum up the above financial performance of the North Sabah field with the following figures:
· Total oil sold: 2,075,305 bbl
· Average realized oil price: USD 68.57/bbl
· Average OPEX per bbl: USD 13.23/bbl

Anasuria oil field
https://preview.redd.it/586u4kfo8br41.png?width=1038&format=png&auto=webp&s=7580fc7f7df7e948754d025745a5cf47d4393c0f
Doing the same exercise as above for the Anasuria field, we arrive at the following financial performance for the Anasuria field:
· Total oil sold: 1,073,304 bbl
· Average realized oil price: USD 63.57/bbl
· Average OPEX per bbl: USD 23.22/bbl
As gas production is relatively immaterial, and to be conservative, we shall only consider the crude oil production from the Anasuria field in forecasting revenues.

Valuation (Method 1)

Putting the figures from both oil fields together, we get the following data:
https://preview.redd.it/7y6064dq8br41.png?width=700&format=png&auto=webp&s=2a4120563a011cf61fc6090e1cd5932602599dc2
Given that we have determined LTM EBITDA of RM 632m, the next step would be to subtract ITDA (interest, tax, depreciation & amortization) from it to obtain estimated LTM Net Profit. Using FY2020’s ITDA of approximately RM 318m as a guideline, we arrive at an estimated LTM Net Profit of RM 314m (FY20: 230m). Given the current market capitalization of RM 714.7m, this implies a trailing LTM PE of 2.3x.
Performing a sensitivity analysis given different oil prices, we arrive at the following net profit table for the company under different oil price scenarios, assuming oil production rate and ITDA remain constant:
https://preview.redd.it/xixge5sr8br41.png?width=433&format=png&auto=webp&s=288a00f6e5088d01936f0217ae7798d2cfcf11f2
From the above exercise, it becomes apparent that Hibiscus has a breakeven oil price of about USD 41.8863/bbl, and has a lot of operating leverage given the exponential rate of increase in its Net Profit with each consequent increase in oil prices.
Considering that the oil production rate (EBITDA) is likely to increase faster than ITDA’s proportion to revenues (fixed costs), at an implied PE of 4.33x, it seems likely that an investment in Hibiscus will be profitable over the next 10 years (with the assumption that oil prices will revert to the mean in the long-term).

Valuation (Method 2)

Of course, there are a lot of assumptions behind the above method of valuation. Hence, it would be prudent to perform multiple methods of valuation and compare the figures to one another.
As opposed to the profit/loss assessment in Valuation (Method 1), another way of performing a valuation would be to estimate its balance sheet value, i.e. total revenues from 2P Reserves, and assign a reasonable margin to it.
https://preview.redd.it/o2eiss6u8br41.png?width=710&format=png&auto=webp&s=03960cce698d9cedb076f3d5f571b3c59d908fa8
From the above, we understand that Hibiscus’s 2P reserves from the North Sabah and Anasuria fields alone are approximately 44.2 mmbbl (we ignore contribution from Australia’s VIC cluster as it hasn’t been developed yet).
Doing a similar sensitivity analysis of different oil prices as above, we arrive at the following estimated total revenues and accumulated net profit:
https://preview.redd.it/h8hubrmw8br41.png?width=450&format=png&auto=webp&s=6d23f0f9c3dafda89e758b815072ba335467f33e
Let’s assume that the above average of RM 9.68 billion in total realizable revenues from current 2P reserves holds true. If we assign a conservative Net Profit margin of 15% (FY20: 23%; past 5 years average: 16%), we arrive at estimated accumulated Net Profit from 2P Reserves of RM 1.452 billion. Given the current market capitalization of RM 714 million, we might be able to say that the equity is worth about twice the current share price.
However, it is understandable that some readers might feel that the figures used in the above estimate (e.g. net profit margin of 15%) were randomly plucked from the sky. So how do we reconcile them with figures from the financial statements? Fortunately, there appears to be a way to do just that.
Intangible Assets
I refer you to a figure in the financial statements which provides a shortcut to the valuation of 2P Reserves. This is the carrying value of Intangible Assets on the Balance Sheet.
As of 2QFY21, that amount was RM 1,468,860,000 (i.e. RM 1.468 billion).
https://preview.redd.it/hse8ttb09br41.png?width=881&format=png&auto=webp&s=82e48b5961c905fe9273cb6346368de60202ebec
Quite coincidentally, one might observe that this figure is dangerously close to the estimated accumulated Net Profit from 2P Reserves of RM 1.452 billion we calculated earlier. But why would this amount matter at all?
To answer that, I refer you to the notes of the Annual Report FY20 (AR20). On page 148 of the AR20, we find the following two paragraphs:
E&E assets comprise of rights and concession and conventional studies. Following the acquisition of a concession right to explore a licensed area, the costs incurred such as geological and geophysical surveys, drilling, commercial appraisal costs and other directly attributable costs of exploration and appraisal including technical and administrative costs, are capitalised as conventional studies, presented as intangible assets.
E&E assets are assessed for impairment when facts and circumstances suggest that the carrying amount of an E&E asset may exceed its recoverable amount. The Group will allocate E&E assets to cash generating unit (“CGU”s or groups of CGUs for the purpose of assessing such assets for impairment. Each CGU or group of units to which an E&E asset is allocated will not be larger than an operating segment as disclosed in Note 39 to the financial statements.)
Hence, we can determine that firstly, the intangible asset value represents capitalized costs of acquisition of the oil fields, including technical exploration costs and costs of acquiring the relevant licenses. Secondly, an impairment review will be carried out when “the carrying amount of an E&E asset may exceed its recoverable amount”, with E&E assets being allocated to “cash generating units” (CGU) for the purposes of assessment.
On page 169 of the AR20, we find the following:
Carrying amounts of the Group’s intangible assets, oil and gas assets and FPSO are reviewed for possible impairment annually including any indicators of impairment. For the purpose of assessing impairment, assets are grouped at the lowest level CGUs for which there is a separately identifiable cash flow available. These CGUs are based on operating areas, represented by the 2011 North Sabah EOR PSC (“North Sabah”, the Anasuria Cluster, the Marigold and Sunflower fields, the VIC/P57 exploration permit (“VIC/P57”) and the VIC/L31 production license (“VIC/L31”).)
So apparently, the CGUs that have been assigned refer to the respective oil producing fields, two of which include the North Sabah field and the Anasuria field. In order to perform the impairment review, estimates of future cash flow will be made by management to assess the “recoverable amount” (as described above), subject to assumptions and an appropriate discount rate.
Hence, what we can gather up to now is that management will estimate future recoverable cash flows from a CGU (i.e. the North Sabah and Anasuria oil fields), compare that to their carrying value, and perform an impairment if their future recoverable cash flows are less than their carrying value. In other words, if estimated accumulated profits from the North Sabah and Anasuria oil fields are less than their carrying value, an impairment is required.
So where do we find the carrying values for the North Sabah and Anasuria oil fields? Further down on page 184 in the AR20, we see the following:
Included in rights and concession are the carrying amounts of producing field licenses in the Anasuria Cluster amounting to RM668,211,518 (2018: RM687,664,530, producing field licenses in North Sabah amounting to RM471,031,008 (2018: RM414,333,116))
Hence, we can determine that the carrying values for the North Sabah and Anasuria oil fields are RM 471m and RM 668m respectively. But where do we find the future recoverable cash flows of the fields as estimated by management, and what are the assumptions used in that calculation?
Fortunately, we find just that on page 185:
17 INTANGIBLE ASSETS (CONTINUED)
(a Anasuria Cluster)
The Directors have concluded that there is no impairment indicator for Anasuria Cluster during the current financial year. In the previous financial year, due to uncertainties in crude oil prices, the Group has assessed the recoverable amount of the intangible assets, oil and gas assets and FPSO relating to the Anasuria Cluster. The recoverable amount is determined using the FVLCTS model based on discounted cash flows (“DCF” derived from the expected cash in/outflow pattern over the production lives.)
The key assumptions used to determine the recoverable amount for the Anasuria Cluster were as follows:
(i Discount rate of 10%;)
(ii Future cost inflation factor of 2% per annum;)
(iii Oil price forecast based on the oil price forward curve from independent parties; and,)
(iv Oil production profile based on the assessment by independent oil and gas reserve experts.)
Based on the assessments performed, the Directors concluded that the recoverable amount calculated based on the valuation model is higher than the carrying amount.
(b North Sabah)
The acquisition of the North Sabah assets was completed in the previous financial year. Details of the acquisition are as disclosed in Note 15 to the financial statements.
The Directors have concluded that there is no impairment indicator for North Sabah during the current financial year.
Here, we can see that the recoverable amount of the Anasuria field was estimated based on a DCF of expected future cash flows over the production life of the asset. The key assumptions used by management all seem appropriate, including a discount rate of 10% and oil price and oil production estimates based on independent assessment. From there, management concludes that the recoverable amount of the Anasuria field is higher than its carrying amount (i.e. no impairment required). Likewise, for the North Sabah field.
How do we interpret this? Basically, what management is saying is that given a 10% discount rate and independent oil price and oil production estimates, the accumulated profits (i.e. recoverable amount) from both the North Sabah and the Anasuria fields exceed their carrying amounts of RM 471m and RM 668m respectively.
In other words, according to management’s own estimates, the carrying value of the Intangible Assets of RM 1.468 billion approximates the accumulated Net Profit recoverable from 2P reserves.
To conclude Valuation (Method 2), we arrive at the following:

Our estimates Management estimates
Accumulated Net Profit from 2P Reserves RM 1.452 billion RM 1.468 billion

Financials

By now, we have established the basic economics of Hibiscus’s business, including its revenues (i.e. oil production and oil price scenarios), costs (OPEX, ITDA), profitability (breakeven, future earnings potential) and balance sheet value (2P reserves, valuation). Moving on, we want to gain a deeper understanding of the 3 statements to anticipate any blind spots and risks. We’ll refer to the financial statements of both the FY20 annual report and the 2Q21 quarterly report in this analysis.
For the sake of brevity, I’ll only point out those line items which need extra attention, and skip over the rest. Feel free to go through the financial statements on your own to gain a better familiarity of the business.
https://preview.redd.it/h689bss79br41.png?width=810&format=png&auto=webp&s=ed47fce6a5c3815dd3d4f819e31f1ce39ccf4a0b
Income Statement
First, we’ll start with the Income Statement on page 135 of the AR20. Revenues are straightforward, as we’ve discussed above. Cost of Sales and Administrative Expenses fall under the jurisdiction of OPEX, which we’ve also seen earlier. Other Expenses are mostly made up of Depreciation & Amortization of RM 115m.
Finance Costs are where things start to get tricky. Why does a company which carries no debt have such huge amounts of finance costs? The reason can be found in Note 8, where it is revealed that the bulk of finance costs relate to the unwinding of discount of provision for decommissioning costs of RM 25m (Note 32).
https://preview.redd.it/4omjptbe9br41.png?width=1019&format=png&auto=webp&s=eaabfc824134063100afa62edfd36a34a680fb60
This actually refers to the expected future costs of restoring the Anasuria and North Sabah fields to their original condition once the oil reserves have been depleted. Accounting standards require the company to provide for these decommissioning costs as they are estimable and probable. The way the decommissioning costs are accounted for is the same as an amortized loan, where the initial carrying value is recognized as a liability and the discount rate applied is reversed each year as an expense on the Income Statement. However, these expenses are largely non-cash in nature and do not necessitate a cash outflow every year (FY20: RM 69m).
Unwinding of discount on non-current other payables of RM 12m relate to contractual payments to the North Sabah sellers. We will discuss it later.
Taxation is another tricky subject, and is even more significant than Finance Costs at RM 161m. In gist, Hibiscus is subject to the 38% PITA (Petroleum Income Tax Act) under Malaysian jurisdiction, and the 30% Petroleum tax + 10% Supplementary tax under UK jurisdiction. Of the RM 161m, RM 41m of it relates to deferred tax which originates from the difference between tax treatment and accounting treatment on capitalized assets (accelerated depreciation vs straight-line depreciation). Nonetheless, what you should take away from this is that the tax expense is a tangible expense and material to breakeven analysis.
Fortunately, tax is a variable expense, and should not materially impact the cash flow of Hibiscus in today’s low oil price environment.
Note: Cash outflows for Tax Paid in FY20 was RM 97m, substantially below the RM 161m tax expense.
https://preview.redd.it/1xrnwzm89br41.png?width=732&format=png&auto=webp&s=c078bc3e18d9c79d9a6fbe1187803612753f69d8
Balance Sheet
The balance sheet of Hibiscus is unexciting; I’ll just bring your attention to those line items which need additional scrutiny. I’ll use the figures in the latest 2Q21 quarterly report (2Q21) and refer to the notes in AR20 for clarity.
We’ve already discussed Intangible Assets in the section above, so I won’t dwell on it again.
Moving on, the company has Equipment of RM 582m, largely relating to O&G assets (e.g. the Anasuria FPSO vessel and CAPEX incurred on production enhancement projects). Restricted cash and bank balances represent contractual obligations for decommissioning costs of the Anasuria Cluster, and are inaccessible for use in operations.
Inventories are relatively low, despite Hibiscus being an E&P company, so forex fluctuations on carrying value of inventories are relatively immaterial. Trade receivables largely relate to entitlements from Petronas and BP (both oil supermajors), and are hence quite safe from impairment. Other receivables, deposits and prepayments are significant as they relate to security deposits placed with sellers of the oil fields acquired; these should be ignored for cash flow purposes.
Note: Total cash and bank balances do not include approximately RM 105 m proceeds from the North Sabah December 2019 offtake (which was received in January 2020)
Cash and bank balances of RM 90m do not include RM 105m of proceeds from offtake received in 3Q21 (Jan 2020). Hence, the actual cash and bank balances as of 2Q21 approximate RM 200m.
Liabilities are a little more interesting. First, I’ll draw your attention to the significant Deferred tax liabilities of RM 457m. These largely relate to the amortization of CAPEX (i.e. Equipment and capitalized E&E expenses), which is given an accelerated depreciation treatment for tax purposes.
The way this works is that the government gives Hibiscus a favorable tax treatment on capital expenditures incurred via an accelerated depreciation schedule, so that the taxable income is less than usual. However, this leads to the taxable depreciation being utilized quicker than accounting depreciation, hence the tax payable merely deferred to a later period – when the tax depreciation runs out but accounting depreciation remains. Given the capital intensive nature of the business, it is understandable why Deferred tax liabilities are so large.
We’ve discussed Provision for decommissioning costs under the Finance Costs section earlier. They are also quite significant at RM 266m.
Notably, the Other Payables and Accruals are a hefty RM 431m. What do they relate to? Basically, they are contractual obligations to the sellers of the oil fields which are only payable upon oil prices reaching certain thresholds. Hence, while they are current in nature, they will only become payable when oil prices recover to previous highs, and are hence not an immediate cash outflow concern given today’s low oil prices.
Cash Flow Statement
There is nothing in the cash flow statement which warrants concern.
Notably, the company generated OCF of approximately RM 500m in FY20 and RM 116m in 2Q21. It further incurred RM 330m and RM 234m of CAPEX in FY20 and 2Q21 respectively, largely owing to production enhancement projects to increase the production rate of the Anasuria and North Sabah fields, which according to management estimates are accretive to ROI.
Tax paid was RM 97m in FY20 and RM 61m in 2Q21 (tax expense: RM 161m and RM 62m respectively).

Risks

There are a few obvious and not-so-obvious risks that one should be aware of before investing in Hibiscus. We shall not consider operational risks (e.g. uptime, OPEX) as they are outside the jurisdiction of the equity analyst. Instead, we shall focus on the financial and strategic risks largely outside the control of management. The main ones are:
· Oil prices remaining subdued for long periods of time
· Fluctuation of exchange rates
· Customer concentration risk
· 2P Reserves being less than estimated
· Significant current and non-current liabilities
· Potential issuance of equity
Oil prices remaining subdued
Of topmost concern in the minds of most analysts is whether Hibiscus has the wherewithal to sustain itself through this period of low oil prices (sub-$30). A quick and dirty estimate of annual cash outflow (i.e. burn rate) assuming a $20 oil world and historical production rates is between RM 50m-70m per year, which considering the RM 200m cash balance implies about 3-4 years of sustainability before the company runs out of cash and has to rely on external assistance for financing.
Table 1: Hibiscus EBITDA at different oil price and exchange rates
https://preview.redd.it/gxnekd6h9br41.png?width=670&format=png&auto=webp&s=edbfb9621a43480d11e3b49de79f61a6337b3d51
The above table shows different EBITDA scenarios (RM ‘m) given different oil prices (left column) and USD:MYR exchange rates (top row). Currently, oil prices are $27 and USD:MYR is 1:4.36.
Given conservative assumptions of average OPEX/bbl of $20 (current: $15), we can safely say that the company will be loss-making as long as oil remains at $20 or below (red). However, we can see that once oil prices hit $25, the company can tank the lower-end estimate of the annual burn rate of RM 50m (orange), while at RM $27 it can sufficiently muddle through the higher-end estimate of the annual burn rate of RM 70m (green).
Hence, we can assume that as long as the average oil price over the next 3-4 years remains above $25, Hibiscus should come out of this fine without the need for any external financing.
Customer Concentration Risk
With regards to customer concentration risk, there is not much the analyst or investor can do except to accept the risk. Fortunately, 80% of revenues can be attributed to two oil supermajors (Petronas and BP), hence the risk of default on contractual obligations and trade receivables seems to be quite diminished.
2P Reserves being less than estimated
2P Reserves being less than estimated is another risk that one should keep in mind. Fortunately, the current market cap is merely RM 714m – at half of estimated recoverable amounts of RM 1.468 billion – so there’s a decent margin of safety. In addition, there are other mitigating factors which shall be discussed in the next section (‘Opportunities’).
Significant non-current and current liabilities
The significant non-current and current liabilities have been addressed in the previous section. It has been determined that they pose no threat to immediate cash flow due to them being long-term in nature (e.g. decommissioning costs, deferred tax, etc). Hence, for the purpose of assessing going concern, their amounts should not be a cause for concern.
Potential issuance of equity
Finally, we come to the possibility of external financing being required in this low oil price environment. While the company should last 3-4 years on existing cash reserves, there is always the risk of other black swan events materializing (e.g. coronavirus) or simply oil prices remaining muted for longer than 4 years.
Furthermore, management has hinted that they wish to acquire new oil assets at presently depressed prices to increase daily production rate to a targeted 20,000 bbl by end-2021. They have room to acquire debt, but they may also wish to issue equity for this purpose. Hence, the possibility of dilution to existing shareholders cannot be entirely ruled out.
However, given management’s historical track record of prioritizing ROI and optimal capital allocation, and in consideration of the fact that the MD owns 10% of outstanding shares, there is some assurance that any potential acquisitions will be accretive to EPS and therefore valuations.

Opportunities

As with the existence of risk, the presence of material opportunities also looms over the company. Some of them are discussed below:
· Increased Daily Oil Production Rate
· Inclusion of 2C Resources
· Future oil prices exceeding $50 and effects from coronavirus dissipating
Increased Daily Oil Production Rate
The first and most obvious opportunity is the potential for increased production rate. We’ve seen in the last quarter (2Q21) that the North Sabah field increased its daily production rate by approximately 20% as a result of production enhancement projects (infill drilling), lowering OPEX/bbl as a result. To vastly oversimplify, infill drilling is the process of maximizing well density by drilling in the spaces between existing wells to improve oil production.
The same improvements are being undertaken at the Anasuria field via infill drilling, subsea debottlenecking, water injection and sidetracking of existing wells. Without boring you with industry jargon, this basically means future production rate is likely to improve going forward.
By how much can the oil production rate be improved by? Management estimates in their analyst presentation that enhancements in the Anasuria field will be able to yield 5,000 bbl/day by 2021 (current: 2,500 bbl/day).
Similarly, improvements in the North Sabah field is expected to yield 7,000 bbl/day by 2021 (current: 5,300 bbl/day).
This implies a total 2021 expected daily production rate from the two fields alone of 12,000 bbl/day (current: 8,000 bbl/day). That’s a 50% increase in yields which we haven’t factored into our valuation yet.
Furthermore, we haven’t considered any production from existing 2C resources (e.g. Marigold/Sunflower) or any potential acquisitions which may occur in the future. By management estimates, this can potentially increase production by another 8,000 bbl/day, bringing total production to 20,000 bbl/day.
While this seems like a stretch of the imagination, it pays to keep them in mind when forecasting future revenues and valuations.
Just to play around with the numbers, I’ve come up with a sensitivity analysis of possible annual EBITDA at different oil prices and daily oil production rates:
Table 2: Hibiscus EBITDA at different oil price and daily oil production rates
https://preview.redd.it/jnpfhr5n9br41.png?width=814&format=png&auto=webp&s=bbe4b512bc17f576d87529651140cc74cde3d159
The left column represents different oil prices while the top row represents different daily oil production rates.
The green column represents EBITDA at current daily production rate of 8,000 bbl/day; the orange column represents EBITDA at targeted daily production rate of 12,000 bbl/day; while the purple column represents EBITDA at maximum daily production rate of 20,000 bbl/day.
Even conservatively assuming increased estimated annual ITDA of RM 500m (FY20: RM 318m), and long-term average oil prices of $50 (FY20: $60), the estimated Net Profit and P/E ratio is potentially lucrative at daily oil production rates of 12,000 bbl/day and above.
2C Resources
Since we’re on the topic of improved daily oil production rate, it bears to pay in mind the relatively enormous potential from Hibiscus’s 2C Resources. North Sabah’s 2C Resources alone exceed 30 mmbbl; while those from the yet undiagnosed Marigold/Sunflower fields also reach 30 mmbbl. Altogether, 2C Resources exceed 70 mmbbl, which dwarfs the 44 mmbbl of 2P Reserves we have considered up to this point in our valuation estimates.
To refresh your memory, 2C Resources represents oil volumes which have been discovered but are not yet classified as “commercial”. This means that there is reasonable certainty of the oil being recoverable, as opposed to simply being in the very early stages of exploration. So, to be conservative, we will imagine that only 50% of 2C Resources are eligible for reclassification to 2P reserves, i.e. 35 mmbbl of oil.
https://preview.redd.it/mto11iz7abr41.png?width=375&format=png&auto=webp&s=e9028ab0816b3d3e25067447f2c70acd3ebfc41a
This additional 35 mmbbl of oil represents an 80% increase to existing 2P reserves. Assuming the daily oil production rate increases similarly by 80%, we will arrive at 14,400 bbl/day of oil production. According to Table 2 above, this would yield an EBITDA of roughly RM 630m assuming $50 oil.
Comparing that estimated EBITDA to FY20’s actual EBITDA:
FY20 FY21 (incl. 2C) Difference
Daily oil production (bbl/day) 8,626 14,400 +66%
Average oil price (USD/bbl) $68.57 $50 -27%
Average OPEX/bbl (USD) $16.64 $20 +20%
EBITDA (RM ‘m) 632 630 -
Hence, even conservatively assuming lower oil prices and higher OPEX/bbl (which should decrease in the presence of higher oil volumes) than last year, we get approximately the same EBITDA as FY20.
For the sake of completeness, let’s assume that Hibiscus issues twice the no. of existing shares over the next 10 years, effectively diluting shareholders by 50%. Even without accounting for the possibility of the acquisition of new oil fields, at the current market capitalization of RM 714m, the prospective P/E would be about 10x. Not too shabby.
Future oil prices exceeding $50 and effects from coronavirus dissipating
Hibiscus shares have recently been hit by a one-two punch from oil prices cratering from $60 to $30, as a result of both the Saudi-Russian dispute and depressed demand for oil due to coronavirus. This has massively increased supply and at the same time hugely depressed demand for oil (due to the globally coordinated lockdowns being implemented).
Given a long enough timeframe, I fully expect OPEC+ to come to an agreement and the economic effects from the coronavirus to dissipate, allowing oil prices to rebound. As we equity investors are aware, oil prices are cyclical and are bound to recover over the next 10 years.
When it does, valuations of O&G stocks (including Hibiscus’s) are likely to improve as investors overshoot expectations and begin to forecast higher oil prices into perpetuity, as they always tend to do in good times. When that time arrives, Hibiscus’s valuations are likely to become overoptimistic as all O&G stocks tend to do during oil upcycles, resulting in valuations far exceeding reasonable estimates of future earnings. If you can hold the shares up until then, it’s likely you will make much more on your investment than what we’ve been estimating.

Conclusion

Wrapping up what we’ve discussed so far, we can conclude that Hibiscus’s market capitalization of RM 714m far undershoots reasonable estimates of fair value even under conservative assumptions of recoverable oil volumes and long-term average oil prices. As a value investor, I hesitate to assign a target share price, but it’s safe to say that this stock is worth at least RM 1.00 (current: RM 0.45). Risk is relatively contained and the upside far exceeds the downside. While I have no opinion on the short-term trajectory of oil prices, I can safely recommend this stock as a long-term Buy based on fundamental research.
submitted by investorinvestor to SecurityAnalysis [link] [comments]

Where to find quality Forex tick data?

I downloaded EURUSD tick datasets for several years back from Dukascopy and found out that the data is trash. Many missing periods, sudden inexplicable jumps from one hour to 2 hours in the future etc. There's no way for me to fix this, the quality is simply trash.
Where can I find quality Forex tick historical datasets? I found a few sources googling around, but it takes a fuck ton of time to download it and check, it's even riskier if I have to buy it. Does anyone have any proved sources?
submitted by anon4357 to algotrading [link] [comments]

Where to get historical intraday stock data?

I hate to ask questions that have been asked before. But I am afraid that this is one of them. I have searched the web for days now, read so many forum posts. But I can't find an answer. Most answers about historical intraday data were about sites that offer historical futures and options, but I don't need those (btw. why would you want to use options data, which is derived from the stock data, instead of the actual stock data?).
What I need is historical intraday stock data: At least S&P 500 stocks, dating back 5 years, 30 minute interval (or smaller), a weekly update, OHLC would be nice, but only one of them (close for example) would be sufficient. I need to be able to download the raw data, that means that I can't use something like Quantopian. So the data either needs to be downloadable (like a ZIP folder) or have a python API, so I can download it with the API.
I know, something like this is not free, I would be able to spent up to about $50 a month. I am still a student, so I can't afford much more than that. What I found so far is Kibot and QuantQuote.
Kibot: They seem to have a bad reputation. It seems that their stock data is either inaccurate, or incomplete. I just don't know if this still applies to the last 5 years. Since their data dates back to 1998, I could imagine that they had issues in the beginning but fixed them since they have been in business for more than 20 years. Their Standard subscription costs $49/month and includes 1 minute intraday data for all their symbols (6500 stocks, + ETFs, Futures and Forex) with a weekly update dating back 1 year. So I would also need to purchase once their historical S&P 500 data with a 30 minute interval, dating back to 1998 (I would need 2015 and up) for $150.
I can handle slightly inaccurate data (for example if the pricing is off by 0.5% or something like that), but missing data or inconsistent data (for example if instead of a constant 1min interval, it sometimes jumps multiple minutes) is a problem.
QuantQuote: They are expensive, too expensive. I would need to purchase once their S&P 500 package for $895 and then $50/month for a weekly update. They seem to offer the same as Kibot, but for a much higher price and with a higher quality (I assume).
It would help a lot, if you could say something about Kibot or Quantqote, or just about buying historical intraday data. Maybe you know better sites? Or do you know where to look or ask?
Any comment is appreciated!
submitted by rndmnewguy to Trading [link] [comments]

How to derive historical financial data for forex instrument backtesting

Hello,
If you believe backtesting strategies for forex major currency pairs is unhopeful please leave a comment with an explanation.
I'm a CS major at Columbia with internships in back office global bank infrastructure positions here in NY and have great interest in trading algorithmically because I can't trust my behavior to enter trades, among other obvious reasons.
I would like to know what the best sources are for obtaining historical data (OHLCV, etc) for (forex) backtesting purposes. Is a large excel file used in practice, or are historical prices derived via API's? It seems that I need to pay after some research online, but I know you redditors can deliver.

edit
I found a free source here for EURUSD. There are other pairs available too.
submitted by Reciprocates to algotrading [link] [comments]

Guide to learning MQL5

Hi all, I was hoping someone might be able to help me here.
I've been trying to learn how to code strategies for MQL5 for some time now and I'm finding it quite difficult to find any decent learning resources past the articles from the metatrader website itself.
At the moment I have only basic programming experience, I run some automated systems on the ProRealTime platform that uses BASIC language and is really easy to pick up.
I've been trying to learn to code with metatrader for a while now and have searched all over the internet for some good articles or tutorials that can explain it to a beginner but all the advice I seem to find is just 'learn C++' or 'read the MQL reference page'
I get that I will have to learn C++ (or something similar) eventually and am willing to do so but I was wondering if anyone know of any good resources that maybe helped them in the past? Or if they could suggest some good first steps to a beginner trying to learn?
submitted by KG6450 to algotrading [link] [comments]

HOWTO download Binance historical price data using Python (working code included) for free!

Hello! I wrote this Instructional Post as part of a series on getting historical tick and bar data for various financial products. I've included some custom python code that connected through the Binance API and I thought people here might find it useful. :)
Change the 'BTCUSDT' at the bottom of the included python code to whichever symbol you'd like to pull data on. It's that simple! :)
HOWTO download Binance historical price data using Python (working code included) for free!
Any comments or feedback is welcome! Cheers!
submitted by finance_student to BinanceExchange [link] [comments]

What are the risks and targets?

First of all I'm new in the Forex (and I'm reading "babypips" :-).
I'm trying to look into day-trading, but before opening even demo account I decided to experiment with some historical data.
I found and downloaded 2 years of USD/CAD history of 1-minute candles. Then I wrote a simple script that opens a long position every minute (using open ASK price) and looks when it reaches either the target or stop-loss.
The parameters of each trade:
For calculating position parameters I'm using the following formulas:
With given parameters the used leverage is about 1:30.

My testing on historical data shows that in average there're just 2 or 3 entry points in a day. I'm confused with my next steps, because I think it's not enough to create and test a working strategy.

Should I decrease the target? Or increase leverage and risks? What are the usual targets and risks in the day trading?
Thank you!
submitted by DrunkBystander to Forex [link] [comments]

How To Download Free Historical Data With Metatrader 4 ... How to View or Download Historical Data in MT4  See Upto 50 Year Previous Chart In Metatrader 4 How To Download Historical Data in Metatrader 4 - YouTube How To Download Historic Data Using The MetaTrader 4 ...

How to download our free historical data? Price: Bid. Time: GMT (no Daylight Saving Time) Quality: one of the best free sources. Here you can download free history data for the most common currency pairs (source: Basic (Forexite free data)): Symbol Data Range Size; AUDJPY: Jan 2001 - 10/31/2020: 35.8 MB : AUDUSD: Jan 2001 - 10/31/2020: 33.4 MB : CHFJPY: Jan 2001 - 10/31/2020: 36.0 MB : EURCAD ... Download Historical Data Downloader Robot for forex trading with cTrader. If you want to download intraday Forex data to use with QuantShare or for external use then here a list of websites that allow you to export historical quotes for several currencies for free. Each website allows downloading rates in one or several periods and depending on the provider, data spans from few days to several years. Finam Finam is a Russian website that allows you to get at least ... Download End of Day FOREX Stock Data, Intraday Data and Historical Quotes. The worlds #1 website for end of day & historical stock data ... FOREX: Foreign Exchange: MS7: To make things easier, here are a number of quick links for your daily downloads: Nov 06 2020: Nov 05 2020: Nov 04 2020: Nov 03 2020: Nov 02 2020: Oct 30 2020: Oct 29 2020: Oct 28 2020: Oct 27 2020: Oct 26 2020: Oct 23 2020 ... Download forex data. The Historical Forex Data service is straightforward to use: Select the required instrument from the Symbol list; Select the desired export Format according to the application you use; When you are ready with the options, click the Load data button. The application will fetch the data from the server and will compose the ... If you’re looking for Free Forex Historical Data, you’re in the right place! Here, you’ll be able to find free forex historical data ready to be imported into your favorite application like MetaTrader, NinjaTrader, MetaStock or any other trading platform.. Since the data is delivered in .CSV format (comma separated values), you can use it in any almost any application that allows you to ... Download free historical data. Import historical data in MetaTrader, Excel, Forex Strategy Builder, Expert Advisor Studio. For a more convenient access you can Download the Forex Historical Data by FTP. Get your FTP or SFTP access, via PayPal, here: For more details: Download by FTP DataFiles Last Updated at: 2020-08-31 22:00. Get Automatic Updates! You can get the Forex Historical Data Automatic Updates using Google Drive! Subscribe, via PayPal, here: Select File Format: GoogleDrive/GMail Address: For more ... Historical forex data into excel historical forex data into excel forex historical data csv money changer mid valley forex historical data csv how to forex historical rates how to metatrader 4 historical data trading heroes. Tweet Pin It. Related Posts. Us To Malaysia. Ge Ranges Reviews. Recent Posts . Forex Trading Websites. Dinero De Costarica. Swedish Currency Exchange. Currency Converter ... Forex Historical Data App is absolutely free for all the traders who want to download Forex data CSV and use it to backtest trading strategies and Robots. Forex Historical Data App is FREE! The Forex Historical Data app is developed to solve one of the biggest problems that the beginner algo traders meet – the brokers do not provide a lot of bars.

[index] [7505] [1637] [20378] [29180] [803] [19200] [14221] [17418] [1675] [17986]

How To Download Free Historical Data With Metatrader 4 ...

This video is for those traders that find their charts do not display enough bars. In this video I will show you how to download fresh historical data for yo... How to View or Download Historical Data in MT4 See Upto 50 Year Previous Chart In Metatrader 4 Registration Link Forex Brokers : https://goo.gl/JRFCZe Forex Broker Local Deposit & Withdrawal ... In this video you can see how to download Free Historical Data in Metatrader 4. https://mql4tradingautomation.com/metatrader-download-historical-data-backtes... https://www.forexboat.com/ Get Your Free Membership Now! Downloading historical data in metatrader 4 is important part in backtesting as metatrader is alread...

http://binaryoptiontrade.lobachmy.cf