Download Stock Data and Historical Quotes for Foreign ...

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]

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]

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]

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]

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]

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]

A review of data/APIs for newcomers

I was thinking that we should have a better reference to acquiring data than what is currently on the sidebar.
Here are a few links I have collected that I think will be helpful to others. Please post your own links and mention your experiences with these data providers.
On acquiring data:
On APIs:
submitted by jvrssc to algotrading [link] [comments]

Download historical exchange rates

Howdy!
I've been trying to build into my spreadsheet a way to download historical foreign exchange rate, but so far no luck. I've found this link with a spreadsheet downloading info from an Ohana website, but apparently it doesn't work anymore. (Or it's now a paid service which doesn't work for me either way)
Any ideas on how to do this?
EDIT: So, just as an addendum to my issue, this spreadsheet will be opened once every other week (maybe), but every time it opens it needs to update with all the exchange rates from the passed days.
My current code that sort of works
 Sub GetData() Dim str As String Dim iRow As Integer Dim rngCambio As Range Set DataSheet = Worksheets("CAMBIO") Application.ScreenUpdating = False Application.DisplayAlerts = False Application.Calculation = xlCalculationManual QueryQuote: With Sheets("CAMBIO").QueryTables.Add(Connection:="URL;https://www.currency-converter.org.uk/currency-rates/historical/table/EUR-RON.html", Destination:=Sheets("CAMBIO").Range("a1")) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With ActiveSheet.Hyperlinks.Delete Range("A1,C1,E1").EntireColumn.Delete Range("A1:A66").EntireRow.Delete iRow = Range("B:B").Cells.Find(What:="", SearchOrder:=xlRows, SearchDirection:=xlNext, LookIn:=xlValues).Row - 1 Set rngCambio = Range("B1", "B" & iRow) For Each Cell In rngCambio Cell.Value = Left(Cell.Value, InStr(Cell.Value, " ") - 1) Next Cell 
End Sub
submitted by NickNunes26 to excel [link] [comments]

You can use TD Ameritrade's real-time equity data for free, for paper trading without the 20-minute delay.

In case people didn't know, if you use a platform which "contains" a paper trading acccount, rather than relying on the TOS platform entirely, you can take advantage of the free real-time US equity data for paper trading. So to keep this simple you can get NinjaTrader for free here, it's generally considered a free platform for those who didn't know. https://ninjatrader.com/FreeLiveData When you get NT through this method, you can pick Futures or Forex data. You can go back and fill out each one if you'd like say, do Futures first (that'll be through CQG and give you a lot of data for 7 days or 14, I can't recall) and the Forex through FXCM. Regardless, you don't have to use either one if you don't want. After that you'll be able to download NT installer, I always go with NinjaTrader 8, it works well. Rather than 7, that is.
Simply click "connections" in the main panel once it's open, and add a TD Ameritrade connection with the same login/pass you'd use to login to TOS or your TD/AT online account.
One important thing to note: If you want tick data, at the least NinjaTrader will say give you 10 tick, 2, 1 tick or even intervals like 1s (literally type 1s or 10s or 1t 3t 10t etc and hit enter when you have a chart open) but I believe it's derived from the bar data, if that makes sense. Also if you're viewing anything less than the 1 minute bar timeframe, itll just start off at the time you've opened the chart with such tick/second/range/interval data, and no historical on the chart. So if I'm doing that I like to open a second chart in another tab of the same instrument to show the historical data.
So the paper trading account is within the NT platform, and so long as you make sure you have set up your default account to be say Sim101, the usual name of the default paper trading account, you won't be actually executing trades through the TD Ameritrade broker, but you get to trade on real-time data.
Between this being free data, the possibility of using Rithmic, CQG and FXCM trials for futures and forex, you can get basically all free data. For a paper trader like me, that's nice because I have no skin the game... I think that's the saying.
Keep in mind I'm not promoting NinjaTrader in any commercial capacity and have no affiliation with them whatsoever as a company or in any manner I can conceive. There's one other platform I use which isn't free that's compatible with TD Ameritrade's data and that's called MotiveWave. It also does support simulated trading very very well. I suggest checking it out and I'll just say Google MotiveWaveTM 4.2.8 Ultimate Edition ;) Hope this isn't just old news everyone here has known. If so, let me know. Happy trading and hope this coming trading week is a good one.
Edit: Some other resources which at least have free trials available without necessarily needing any payment info I find useful are: 1) www.livesquawk.com (Especially Steve K's market signals... I've only heard of McAffe's signals but never tried them, however Steve K is a good guy and seems to really know what he's doing. Tl;dr, they work for me in paper trading).
2) https://www.tradethenews.com - you need a linkedin with 5 or more connections to get the free trial but they have a great squawk service with a guy from NYC who seems to be on literally almost 24 hours a day 5 days a week.
3) https://pro.benzinga.com - a Bloomberg Terminal alternative basically, but not as fancy... for more fancy see:
4) http://www.metastock.com/fundsoft4 This one isn't really explained the best on their own site, in my opinion but I've been using the free 30 day trial and what it is, is Metastock's own way of selling Reuters Eikon service. Eikon is about the best Bloomberg Terminal alternative I've found yet in many years of searching. I'm more into looking at data and figuring out how plats work than the actual trading in some ways. Important note on this one: Once you do have a trial, and they take a little while to rubber stamp it so be patient with the emails they send, you can login through the regular Reuters Eikon web login if you wish rather than using the Windows standalone program. They're the same one's just web-baed.
5) Lastly for now, https://www.money.net - definitely worth checking out. Has it's own live squawk for news during trading hours and definitely no payment info needed for a trial. You can login once trial acquired via login.money.net or the now 'legacy' installable platform. They're both good but I'm not crazy about the iOS/Android versions at all.
submitted by FraterThelemaSucks to stocks [link] [comments]

Historical minute data: Pitrading vs Kibot vs IQFeed vs other?

I'm looking to get a lot of data with minute resolution, without spending thousands. I'm curious if anyone has experience with one of the following datasets:
I'd love to hear if anyone has experience with these or can recommend another similar source!

EDIT:
https://web.archive.org/web/20160722011536/http://michaels-musings.com/sources-intraday-historical-stock-data.html
^found this interesting write up, although it was posted in 2010 so who knows how relevant it is now.
submitted by mushytaco to algotrading [link] [comments]

stock marketing full guide 2019

stock marketing full guide 2019
stock market

What's the Stock Market? full guide.

The inventory market refers back to the assortment of markets and exchanges the place common actions of shopping for, promoting, and issuance of shares of publicly-held firms happen. Such monetary actions are performed by way of institutionalized formal exchanges or over-the-counter (OTC) marketplaces which function underneath an outlined set of laws. There may be a number of inventory buying and selling venues in a rustic or an area which permit transactions in shares and different types of securities.
Whereas each phrase - inventory market and inventory alternate - are used interchangeably, the latter time period is usually a subset of the previous. If one says that she trades within the inventory market, it implies that she buys and sells shares/equities on one (or extra) of the inventory alternate(s) which are a part of the general inventory market. The main inventory exchanges within the U.S. embrace the New York Stock Exchange (NYSE), Nasdaq, the Higher Different Buying and selling System (BATS). and the Chicago Board Options Exchange (CBOE). These main nationwide exchanges, together with a number of different exchanges working within the nation, type the inventory market of the U.S.
Although it's known as an inventory market or fairness market and is primarily identified for buying and selling shares/equities, different monetary securities - like exchange-traded funds (ETF), corporate bonds and derivatives primarily based on shares, commodities, currencies, and bonds - are additionally traded within the inventory markets.

Read also.

Inventory Market

Understanding the Inventory Market

Whereas right this moment it's potential to buy nearly every part online, there's often a delegated marketplace for each commodity. For example, folks drive to metropolis outskirts and farmlands to buy Christmas bushes, go to the native timber market to purchase wooden and different obligatory materials for house furnishings and renovations, and go to shops like Walmart for his or her common grocery provides.
Such devoted markets function a platform the place quite a few patrons and sellers meet, work together and transact. For the reason that a variety of market individuals is large, one is assured of good worth. For instance, if there is just one vendor of Christmas bushes in your complete metropolis, he could have the freedom to cost any worth he pleases because the patrons gained’t have wherever else to go. If the variety of tree sellers is massive in a standard market, they must compete in opposition to one another to draw patrons. The patrons can be spoiled for selection with low- or optimum-pricing making it a good market with worth transparency. Even whereas buying online, patrons examine costs supplied by totally different sellers on the identical buying portal or throughout totally different portals to get one of the best offers, forcing the assorted online sellers to supply one of the best worth.
An inventory market is an identical designated marketplace for buying and selling numerous sorts of securities in a managed, safe and managed the atmosphere. For the reason that inventory market brings collectively a whole bunch of hundreds of market individuals who want to purchase and promote shares, it ensures honest pricing practices and transparency in transactions. Whereas earlier inventory markets used to situation and deal in paper-based bodily share certificates, the fashionable day computer-aided inventory markets function electronically.

How the Inventory Market Works

In a nutshell, inventory markets present a safe and controlled atmosphere the place market individuals can transact in shares and different eligible monetary devices with confidence with zero- to low-operational danger. Working underneath the outlined guidelines as acknowledged by the regulator, the inventory markets act as primary markets and as secondary markets.
As the main market, the inventory market permits firms to the situation and promote their shares to the wider public for the primary time by way of the method of initial public offerings (IPO). This exercise helps firms increase obligatory capital from traders. It primarily implies that an organization divides itself into quite a few shares (say, 20 million shares) and sells part of these shares (say, 5 million shares) to the wider public at a worth (say, $10 per share).
To facilitate this course of, an organization wants a market the place these shares may be offered. This market is offered by the inventory market. If every part goes as per the plans, the corporate will efficiently promote the 5 million shares at a worth of $10 per share and acquire $50 million value of funds. Traders will get the corporate shares which they will anticipate to carry for his or her most well-liked length, in anticipation of rising in share worth and any potential revenue within the type of dividend funds. The inventory alternate acts as a facilitator for this capital elevating course of and receives a charge for its providers from the corporate and its monetary companions.
Following the first-time share issuance IPO train known as the itemizing course of, the inventory alternate additionally serves because the buying and selling platform that facilitates common shopping for and promoting of the listed shares. This constitutes the secondary market. The inventory alternate earns a charge for each commerce that happens on its platform in the course of the secondary market exercise.
The inventory alternate shoulders the accountability of making certain price transparency, liquidity, price discovery and honest dealings in such buying and selling actions. As nearly all main inventory markets throughout the globe now function electronically, the alternate maintains buying and selling techniques that effectively handle the purchase and promote orders from numerous market individuals. They carry out the worth matching operate to facilitate commerce execution at a worth honest to each patron and sellers.
A listed firm can also supply new, extra shares by way of different choices at a later stage, like by way of rights issue or by way of follow-on offers. They could even buyback or delist their shares. The inventory alternate facilitates such transactions.
The inventory alternate usually creates and maintains numerous market-level and sector-specific indicators, just like the S&P 500 index or Nasdaq 100 index, which give a measure to trace the motion of the general market.
The inventory exchanges additionally preserve all firm information, bulletins, and monetary reporting, which may be often accessed on their official web sites. An inventory alternate additionally helps numerous different corporate-level, transaction-related actions. For example, worthwhile firms might reward traders by paying dividends which often comes from the part of the corporate’s earnings. The alternate maintains all such data and will assist its processing to a sure extent.

Features of an Inventory Market

An inventory market primarily serves the next features:
Truthful Dealing in Securities Transactions: Relying on the usual rules of demand and supply, the inventory alternate wants to make sure that all market individuals have instantaneous entry to information for all purchase and promote orders thereby serving to within the honest and clear pricing of securities. Moreover, it also needs to carry out environment-friendly matching of acceptable purchase and promote orders.
For instance, there could also be three patrons who've positioned orders for purchasing Microsoft shares at $100, $105 and $110, and there could also be 4 sellers who're keen to promote Microsoft shares at $110, $112, $115 and $120. The alternate (by way of their pc operated automated buying and selling techniques) wants to make sure that one of the best purchase and greatest promote are matched, which on this case is at $110 for the given amount of commerce.
Environment-friendly Value Discovery: Inventory markets must assist an environment-friendly mechanism for worth discovery, which refers back to the act of deciding the correct worth of a safety and is often carried out by assessing market provide and demand and different components related to the transactions.
Say, a U.S.-based software program firm is buying and selling at a worth of $100 and has a market capitalization of $5 billion. Information merchandise is available in that the EU regulator has imposed a wonderful of $2 billion on the corporate which primarily implies that 40 % of the corporate’s worth could also be worn out. Whereas the inventory market might have imposed a buying and selling worth vary of $90 and $110 on the corporate’s share worth, it ought to effectively change the permissible buying and selling worth restrict to accommodate for the potential adjustments within the share worth, else shareholders might battle to commerce at a good worth.
Liquidity Upkeep: Whereas getting the variety of patrons and sellers for a specific monetary safety are uncontrolled for the inventory market, it wants to make sure that whosoever is certified and keen to commerce will get instantaneous entry to position orders which ought to get executed on the honest worth.
Safety and Validity of Transactions: Whereas extra individuals are vital for environment-friendly working of a market, the identical market wants to make sure that all individuals are verified and stay compliant with the required guidelines and laws, leaving no room for default by any of the events. Moreover, it ought to make sure that all related entities working out there should additionally adhere to the principles, and work inside the authorized framework given by the regulator.
Help All Eligible Kinds of Contributors: A market is made by quite a lot of individuals, which embrace market makers, traders, merchants, speculators, and hedgers. All these individuals function within the inventory market with totally different roles and features. For example, an investor might purchase shares and maintain them for long run spanning a few years, whereas a dealer might enter and exit a place inside seconds. A market maker gives obligatory liquidity out there, whereas a hedger might prefer to commerce in derivatives for mitigating the danger concerned in investments. The inventory market ought to make sure that all such individuals are capable of function seamlessly fulfilling their desired roles to make sure the market continues to function effectively.
Investor Safety: Together with rich and institutional traders, a really massive variety of small traders are additionally served by the inventory marketplace for their small quantity of investments. These traders might have restricted monetary information, and will not be totally conscious of the pitfalls of investing in shares and different listed devices. The inventory alternate should implement obligatory measures to supply the required safety to such traders to protect them from monetary loss and guarantee buyer belief.
For example, an inventory alternate might categorize shares in numerous segments relying on their danger profiles and permit restricted or no buying and selling by widespread traders in high-risk shares. Derivatives, which have been described by Warren Buffett as monetary weapons of mass destruction, aren't for everybody as one might lose far more than they guess for. Exchanges usually impose restrictions to forestall people with restricted revenue and information from entering into dangerous bets of derivatives.
Balanced Regulation: Listed firms are largely regulated and their dealings are monitored by market regulators, just like the Securities and Exchange Commission (SEC) of the U.S. Moreover, exchanges additionally mandate sure necessities – like, well timed submitting of quarterly monetary stories and instantaneous reporting of any related developments - to make sure all market individuals grow to be conscious of company happenings. Failure to stick to the laws can result in the suspension of buying and selling by the exchanges and different disciplinary measures.

Regulating the Inventory Market

An area monetary regulator or competent financial authority or institute is assigned the duty of regulating the inventory market of a rustic. The Securities and Alternate Fee (SEC) is the regulatory physique charged with overseeing the U.S. inventory markets. The SEC is a federal company that works independently of the federal government and political strain. The mission of the SEC is acknowledged as: "to guard traders, preserve honest, orderly, and environment-friendly markets, and facilitate capital formation."

Inventory Market Contributors

Together with long-term traders and brief time period merchants, there are a lot of several types of gamers related to the inventory market. Everyone has a singular function, however, lots of the roles are intertwined and rely on one another to make the market run successfully.
  • Stockbrokers, also called registered representatives within the U.S., are the licensed professionals who purchase and promote securities on behalf of traders. The brokers act as intermediaries between the inventory exchanges and the traders by shopping for and promoting shares on the traders' behalf. An account with a retail dealer is required to realize entry to the markets.
  • Portfolio managers are professionals who make investments portfolios, or collections of securities, for purchasers. These managers get suggestions from analysts and make the purchase or promote choices for the portfolio. Mutual fund firms, hedge funds, and pension plans use portfolio managers to make choices and set the funding methods for the cash they maintain.
  • Investment bankers characterize firms in numerous capacities, comparable to personal firms that wish to go public through an IPO or firms which are concerned in pending mergers and acquisitions. They care for the itemizing course of in compliance with the regulatory necessities of the inventory market.
  • Custodian and depot service suppliers, that are establishment holding prospects' securities for safekeeping in order to reduce the danger of their theft or loss, additionally function in sync with the alternative to switch shares to/from the respective accounts of transacting events primarily based on buying and selling on the inventory market.
  • Market maker: A market maker is a broker-dealer who facilitates the buying and selling of shares by posting bid and ask costs together with sustaining a listing of shares. He ensures adequate liquidity out there for a specific (set of) share(s), and income from the distinction between the bid and the ask worth he quotes.

How Inventory Exchanges Make Cash

Inventory exchanges function as for-profit institutes and cost a charge for his or her providers. The first supply of revenue for these inventory exchanges are the revenues from the transaction charges which are charged for every commerce carried out on its platform. Moreover, exchanges earn income from the itemizing charge charged to firms in the course of the IPO course of and different follow-on choices.
The alternate additionally earn from promoting market information generated on its platform - like real-time information, historical information, abstract information, and reference information – which is significant for fairness analysis and different makes use of. Many exchanges will even promote know-how merchandise, like a buying and selling terminal and devoted community connection to the alternate, to the events for an acceptable charge.
The alternate might supply privileged providers like high-frequency trading to bigger purchasers like mutual funds and asset management companies (AMC), and earn cash accordingly. There are provisions for regulatory charge and registration charge for various profiles of market individuals, just like the market maker and dealer, which type different sources of revenue for the inventory exchanges.
The alternate additionally make income by licensing their indexes (and their methodology) that are generally used as a benchmark for launching numerous merchandise like mutual funds and ETFs by AMCs.
Many exchanges additionally present programs and certification on numerous monetary matters to trade individuals and earn revenues from such subscriptions.

Competitors for Inventory Markets

Whereas particular person inventory exchanges compete in opposition to one another to get most transaction quantity, they're dealing with menace on two fronts.
Darkish Swimming pools: Dark pools, that are personal exchanges or boards for securities buying and selling and function inside personal teams, are posing a problem to public inventory markets. Although their authorized validity is topic to native laws, they're gaining a reputation as individuals save massive on transaction charges.
Blockchain Ventures: Amid rising reputation of blockchains, many crypto exchanges have emerged. Such exchanges are venues for buying and selling cryptocurrencies and derivatives related to that asset class. Although their reputation stays restricted, they pose a menace to the standard inventory market mannequin by automating a bulk of the work completed by numerous inventory market individuals and by providing zero- to low-cost providers.

Significance of the Inventory Market

The inventory market is among the most significant parts of a free-market economic system.
It permits firms to lift cash by providing inventory shares and company bonds. It lets widespread traders take part within the monetary achievements of the businesses, make income by way of capital gains, and earn cash by way of dividends, though losses are additionally potential. Whereas institutional traders {and professional} cash managers do get pleasure from some privileges owing to their deep pockets, higher information and better danger taking skills, the inventory market makes an attempt to supply a stage taking part in subject to widespread people.
The inventory market works as a platform by way of which financial savings and investments of people are channelized into the productive funding proposals. In the long run, it helps in capital formation & financial progress for the nation.

KEY TAKEAWAYS

  • Inventory markets are very important parts of a free-market economic system as a result of they permit democratized entry to buying and selling and alternate of capital for traders of all types.
  • They carry out a number of features in markets, together with environment-friendly worth discovery and environment-friendly dealing.
  • Within the US, the inventory market is regulated by the SEC and native regulatory our bodies.

Examples of Inventory Markets

The primary inventory market on the planet was the London inventory alternate. It was begun in a coffeehouse, the place merchants used to satisfy to alternate shares, in 1773. The primary inventory alternate in the USA of America began in Philadelphia in 1790. The Buttonwood settlement, so named as a result of it was signed underneath a buttonwood tree, marked the beginnings of New York's Wall Avenue in 1792. The settlement was signed by 24 merchants and was the primary American group of its type to commerce in securities. The merchants renamed their enterprise as New York Inventory and Alternate Board in 1817.
submitted by Red-its to forexinfo [link] [comments]

Looking for something similar to OnDemand

I am from Europe and in need of something similar to ThinkOrSwim's "OnDemand" feature for market replay with historically accurate data for stocks. I tried downloading NinjaTrader for this sole purpose, but from what i understand it's only for futures and forex.
Anyone know of a solution to this? I am getting bored of having to wait for market hours to paper trade.
submitted by fuerie9191 to Trading [link] [comments]

Dukascopy forex data

I've been trying to get data from the Dukascopy forex historicals for quite some time now, and I'd like to summarize what I've done so far, and what I still need, in order to help anyone else that also wants to use it.
First, just downloading the data is a pain. The URL that you have to get it from is
 https://datafeed.dukascopy.com/datafeed/{PAIR}/{YEAR}/{MONTH}/{DAY}/{HOUR}h_ticks.bi5 {PAIR} is the currency pair, for example "AUDUSD", "EURUSD", or "USDJPY" {YEAR} is the year, for example "2010", "2014", or "2017" {MONTH} is the month, a two digit number. For some reason, months are zero-indexed. For example, "00" corresponds to January, "05" is June, "11" is December. {DAY} is the day of the month, and as far as I can tell, it is NOT zero-indexed. Again, it is two digits wide. {HOUR} is the hour of the day. For some reason, Dukascopy stores each hour of the day separately. It is zero-indexed, so "00" to "23" 
Now that you have a *.bi5 file, you have to extract it. *.bi5 files are lzma compressed files, so find a way to extract them. I used 7z command line.
Now once you've extracted it, you'll notice it's still a binary file. The data is stored in 20 byte wide rows, with each 4 byte segment corresponding to a piece of data. Example:
[ TIME ] [ ASKP ] [ BIDP ] [ ASKV ] [ BIDV ] 0000 0800 0002 2f51 0002 2f47 4096 6666 4013 3333 TIME is a 32-bit big-endian integer representing the number of milliseconds that have passed since the beginning of this hour. ASKP is a 32-bit big-endian integer representing the asking price of the pair, multiplied by 100,000. BIDP is a 32-bit big-endian integer representing the bidding price of the pair, multiplied by 100,000. ASKV is a 32-bit big-endian floating point number representing the asking volume, divided by 1,000,000. BIDV is a 32-bit big-endian floating point number representing the bidding volume, divided by 1,000,000. 
This is how far I've gotten so far before I noticed that something is wrong. The contents of the *.bi5 file do not match the contents of the file that you can download from the official front-end, here: https://www.dukascopy.com/swiss/english/marketwatch/historical/ .
For example, the January 8, 2010 *.csv file does not match in any way with the *.bi5 file of the corresponding day. Does anyone know what I am doing wrong?
EDIT: Another question is about the hours: what time zone are these files relative to? It seems that the data starts showing up from the last two hours of Sunday, going through the week, and then stopping some time before Friday ends, all relative to whatever timezone this is in.
submitted by Allurisk to algotrading [link] [comments]

Forex Sentiment Data Overview, it's Application in Algo trading, and Free Sample Data

From Commitment of Traders (COT) to the Daily Sentiment Index (DSI), to the Put/Call ratio and more, sentiment data has long been highly sought after by both professional and retail traders in the mission to get an edge in the market. Equity and futures traders can access this market data relatively easily due to the centralization of the market they are trading.

But what about Forex traders? There is no single centralized exchange for the Foreign Exchange market therefore sentiment data is difficult to obtain and can be extremely pricey for Forex traders. Furthermore, if a trader had access to such data, the sample set may be limited and not closely reflect the actual market.

In order for Forex sentiment data to be valuable, the data must be derived from a large, far reaching sample of Forex traders. FXCM boasts important Forex trading volumes and a significant trader sample and the broker’s large sample size is one of the most representative samples of the entire retail Forex market. Therefore, the data can be used to help predict movement of the rate of an instrument in the overall market.

This sentiment data shows the retail trader positioning and is derived from the buyer-to-seller ratio among retail FXCM traders. At a glance, you can see historical and current trader positioning in the market. A positive ratio indicates there are more traders that are long for every trader that is short. A negative ratio is indicative of a higher number of traders that are short for every long trader. For example, a ratio of 2.5 would mean that there are 2.5 traders that are long for every short trader and -2.5 would mean just the opposite.

When it comes to algo trading, sentiment can be used as a contrarian indicator to help predict potential moves and locate trading opportunities. When there is an extreme ratio or net volume reading, the majority of traders are either long or short a specific instrument. It is expected that the traders who are currently in these positions will eventually close out therefore bring the ratio back to neutral. Consequently, there tends to be a sharp price movement or a reversal.

When extremes like this are present in the market, a mean reversion automated strategy can be implemented to take advantage of the moves in the market that are expected to ensue. If sentiment is skewed very high or very low, price is moving away from the mean. However, over time it is expected to regress back to the mean resulting in a more neutral reading. Neutral would be considered a number close to 1.0 or -1.0. It is recommended that a confirmation indicator or two be coded into the mean reversion strategy as well.

Free one-month sample of the historical Sentiment Data can be accessed by pasting this link in your browser https://sampledata.fxcorporate.com/sentiment/{instrument}.csv.gz and changing the {instrument}: to the pair or CFD you would like to download data for. For example, for USD/JPY data download you would use this link: https://sampledata.fxcorporate.com/sentiment/USDJPY.csv.gz.
When the file downloads, it will be a GNU zip compressed file so you will need to use a decompression utility to open it. To open the file with 7zip, open the downloads folder, click on your file, and click ‘copy path’. Then open 7Zip and paste your clipboard into the address bar and click enter. Then click the ‘extract’ button. This will open a window where you can designate a destination to copy your new csv file. Click OK, and navigate back to your file explorer to see your csv file.
You can find more details about the sentiment data by checking out FXCM’s Github page: https://github.com/fxcm/MarketData/tree/masteSentiment
submitted by JasonRogers to AlgoTradingFXCM [link] [comments]

How can I get this code to work, I want to have a closure function return an object to access private functions?

Ok so I am pretty new to Go since I have been learning for about 2 days, so I apologize for the super basic question.
So anyways right now I am trying to build a micro service that streams fake simulated stock data via web sockets to a client. The data used is essentially a months worth of historical m1(minute bar data) i got here. The data is stored in redis as a JSON object that is an Array of floats [1081.8, 1101.2, 1060.1, 1090.2] which is the exchange rate of EUUSD (multiplied by 1000) of that current minutes Open value, Highest value, Lowest value, Closing Value, but I stream these points 10 times a second from a Node.js service I spun up, the timestamps are created on the client side since it's a simulation.
Here Is what I do with the data Fake early build of sample trading platform
For the Go Service here is what I have:
This is the Main package on github
This is the closure object thing I am trying to make SymbolSock I uploaded it in github so that comments are easier to read, since it explains what each function/struct does.
symbolHandler explained:
When a client sends in a request to subscribe to a Feed such as GBP/JPY a new struct instance is created called symbolPush
type symbolPush struct{ symbol string clients int feed string lastV float32 atIndex int } 
a SymbolPush instance stores an index atIndex which is the index of the shared dataset, it's symbol (which is like it's namespace/websocket channel) and the last closing price.
Also I have a scale-like case class: Which is used by a function I append to the symbolPush struct to send out an instance to be eventually stringified like this conn.WriteJSON(the return value)
 type seriesPoint struct { Symbol string `json:"symb"` LastValue float32 `json:"lastVal"` MinValue float32 `json:"min"` PointData OHLC `json:"data"` } func (s *symbolPush) GetPoint() seriesPoint { s.atIndex++ lastVV := s.lastV if(s.atIndex == (len(dataPoints) -1)){ s.atIndex = 0 } //index 3 is the close value s.lastV = dataPoints[s.atIndex][3] minVal := dataPoints[s.atIndex][2] return seriesPoint{ Symbol: s.symbol, LastValue: lastVV, MinValue: minVal, PointData: dataPoints[s.atIndex], } } 
Now right now it's obvious I am not returning anything that can be used from symbolsock since last night I deleted my old code since it wasn't working and just left it incomplete since I feel I would like to hear some input before I do a sloppy solution.
What I want to have returned from symbolsock is essentially an object that can do this:
Step1:
call the closure function with the JSONblob and return an object like seriesSockets := symbolsock.SymbolStream(theData)
Step2:
Use this object to seriesSockets.joinStream("APPL") which will call newStream function in symbol sockets, either creating a new struct or incrementing the clients field.
Also:
signal when a user has unsubscribed to a feed, which will delete the feed if clients == 0
Also:
get a point from these structs to be broadcasted to subscribed clients like seriesSockets.getSeriesPoint("APPL")
So my main question is how can I return an object like seriesSockets that accomplishes these things?
Oh here are the Go Playgrounds: main symbolSock
Also for readability here are is the github repo
Thanks!
Also I should mention I asked a question earlier which I will get back to once I have more information, but they're related.
submitted by TheBeardofGilgamesh to golang [link] [comments]

Blatantly plagiarism of my website. What should I do?

I run investexcel.net - a website on financial analysis in Excel
This website has copied my articles and Excel spreadsheets (check the dates for who published first). There are minor modifications but it's still 95% derived from my work without any credit.
Example: Foreign Exchange Rates in Excel On investexcel.net On their site
There are two other examples as well, but you get the picture. What should I do, if anything?
Edit: I called the owner of the website (got the number from a whois search). He's not removing the articles, but he's giving me a link. Anyway, I've calmed down now. Maybe I was making too much of a big deal out of it. Once you place something on the Internet, it's something you should expect. After all, everything is fair game on the Internet?
submitted by simulationconsultant to AskReddit [link] [comments]

How to Download Historial Forex Data - Metatrader 4 ... How to get historical tick data for free - YouTube Download historical Forex data for FREE in 3 Simple Steps Get FREE historical data for Ninjatrader in 3 Simple Steps How To Download Historic Data Using The MetaTrader 4 ... Interactive Brokers Historical Data Downloader - YouTube How to Build a Winning Machine Learning FOREX Strategy in ...

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 ... Where To Get Forex Data. There are a few ways to download historical Forex data. I provide my latest finds on the Resources page. Most quality sources provide data back to about 2001. If you can find clean data sources that go back further than that, let me know in the comments below. But for all intents and purposes, 14+ years of data is good ... 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 ... 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 ... Step 3: Submit your query for free forex historical data by clicking on Get Daily, Monthly or Weekly Stats . Step 4: If forex (currency) pairs with a valid range have been selected, there will be two results: A) A statistics table about the forex data range. B) A blue link entitled “Spread Sheet File” to an excel spreadsheet with complete query results. NOTE: You may have to use the blue ... Load Historical Forex Data in Excel. Loading CSV (Comma Separated Values) files in Excel is straightforward. Download the necessary forex symbol files in Excel (CSV) format. Open a new Spreadsheet in Excel. Click on the Data tab in the navigation menu. You can import forex data from Get External Data-> From Text 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 ...

[index] [26014] [10135] [26272] [19239] [16807] [1166] [2843] [2154] [10122] [28041]

How to Download Historial Forex Data - Metatrader 4 ...

Demonstrates how to download free historical tick data for your trading platform in 3 simple steps! Data covers Forex, Commodities, Indices and Stocks from D... 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... Download historical Forex data for FREE in 3 Simple Steps - Duration: 7:24. Tickstory Software 7,205 views. 7:24. Learn the Moving Average Cross Auto Strategy in Ninjatrader - $5,000 Day Review - ... How to Backtest and download forex history data to you computer - Duration: 30:02. Fit Money 62,454 views. 30:02. Get FREE historical data for Amibroker in 3 Simple Steps - Duration: 5:05. ... You may not be seeing all of the Forex historical data that is available and that can be a bad thing. ★ Get clean, Daylight Savings Time adjusted MT4 data he... Simple software that allows you download historical data from IB TWS (Interactive Brokers Trader Workstation) Supports historical data for: stocks and future... In this video we are going learn how about the various sources for historical FOREX data. Primarily, we will be using data from Dukascopy bank. There are man...

http://binary-optiontrade.parlulymdeotsifkau.tk