Monte Carlo Simulation App – Your Best Tool For Forecasting During Uncertain Times

Monte Carlo Simulation App, By: Mohammed Homsi

One of the most important and challenging aspects of forecasting is handling the uncertainty inherent in examining the future, especially in our modern turbulent times with COVID and the staggering collapse in inflation expectations. Comparing actual outcomes against projections underscores the need to explicitly recognize uncertainty.

For that purpose, Monte Carlo simulations are an extremely effective tool for handling risks and probabilities. This probability simulation is a technique used to understand the impact of uncertainty in financial management, cost, and other forecasting models. It’s mainly used to simulate the various sources of uncertainty that affect the value of business, and to calculate a representative value given these possible values of the underlying inputs. In the simulation, the uncertain inputs are described using probability distributions & your computer therefore randomly draws a number from each input distribution and calculates and saves the result. This is repeated hundreds, thousands, or tens of thousands of times, each called an iteration. When taken together, these iterations approximate the probability distribution of the final result.

How is using probability distribution (aka stochastic models) different to Deterministic models that, for example, use averages as inputs in forecasting? The most notable difference is that deterministic models do not account for real-life stochasticity (i.e., extreme values), which may result in wrong predictions, and therefore wrong decisions. In deterministic models however, the output of the model is fully determined by the parameter values and the initial conditions. Additionally, stochastic models possess some inherent randomness. Our natural world is actually buffeted by stochasticity.

There are very few sources that offer stochastic modeling tools, due to their relative complexity. Among those is Oracle’s Crystal Ball; a spreadsheet-based application for predictive modeling, forecasting, simulation, and optimization, that builds on Monte Carlo modeling tools.

Over the past few months, I have managed to program a similar application using R-language which puts the concepts of Monte Carlo simulation into action. The purpose of my application is to forecast the net profit of a business or product line, based on 4 variable inputs: Sales volume, selling price, unit cost, and fixed cost.

I am giving access to this app for free. To use it, please follow the link below: 

https://g0jl5s-samreturns9.shinyapps.io/MonteCarloSimulation/

 Enjoy!

2021’s Resolution: Survive.. and Thrive!

On a Wednesday night in Riyadh in 2008, I was playing basketball with my high school friends at a sports club in our neighborhood. My team was winning the game and we were beaming with excitement. That win was usually followed by a delicious cheat-meal at Burger King within a walking distance from the club. But that night there was an unexpected change in plan – perhaps a better way to celebrate our win. A giant mushroom-shaped fireball rose in the sky less than 3 kilometers from us. It was followed by a thunderous sound that threw us tens of meters across the outdoor basketball court. Lights went out, and an orchestra of car alarms sounded, followed by showers of metal debris clattering and applauding our excellent performance! A few minutes passed by, and then I realize that my left leg was covered in blood, as were my shorts and shoes. All soaked in dark reddish blood.

I was taken to a nearby hospital, and a few months unfolded until I fully recovered. A basketball game coinciding with a terrorist attack was a heck of an event! It was forever engraved onto the walls of my memory.

After that incident, I got back to doing sport again and have tried so many cool activities. Like Brazilian Jiujitsu, climbing one of the tallest mountains in South East Asia, scuba diving at night during a heavy rainstorm, surfing in a remote island, and avidly doing Calisthenics 6 days a week.

On another note, there is no doubt that 2020 was a tough year for us. Many people lost their loved ones, others were exposed (and still are) to different aspects of unrest and difficulty; financially, physically, or mentally.

But what is the commonality between what happened in 2008 and the 2020 pandemic? These, in my opinion, fit the definition of Black Swan events. Black Swan is a term coined by the statistician Nasim Taleb that points to an “unpredictable event that is beyond what is normally expected of a situation and has potentially severe consequences”. We often hear about the term Post Traumatic Stress, or Post Traumatic Stress Disorder (PTSD), which can occur in people who have experienced or witnessed a traumatic event. On the other hand, there is the phenomenon called Post-Traumatic Growth, which is the positive psychological change experienced as a result of adversity and other challenges that lead to a higher level of functioning. Both of these are experienced following a traumatic event, but while the former focuses on the negative aspects, the latter opens up the doors for unlimited growth, robustness, and prosperity. In other words, it is a matter of how we perceive adversity, what position we have to deal with it, and what remedial approaches our societies bring to the fore.

Our modern society strives to fathom these concepts and be acquainted with them. This is evidenced by the numerous messages that our enthusiastic life coaches and motivational speakers try to pass on to the public. These messages sound like:

• There is no success without hardship.
• For every dark night, there is a brighter day.
• We acquire the strength we have overcome.
• Straight roads do not make skillful drivers.
• The salvation of the world is in man’s suffering.
• When you come out of the storm you won’t be the same person who walked in. That’s what this storm’s all about.

These are just a few, and the list goes on and on.

Embracing a different perspective on hardships can make all the difference. A sound and effective way for them to be looked at is as opportunities for growth, creators of a sense of urgency to accelerate change sooner and build resilience, a workout for willpower. Unwanted visitors that come in to harden our systems and stiffen up our survival skillset.

On the other hand, many philosophers looked at comfort, almost any form of comfort, as a road to waste. And many argued that when we have things too easy, it can lead to a dangerous weakening of our will. One does not increase his or her fitness level or build muscles without enduring the pain of the breakdown and recovery of muscles after workouts. We are the offspring of the stronger generations who survived all types of stressors and catastrophes and ended up more robust and resilient, hence you and I came to life.

Let us not wish for a 2021 of ease and comfort, but for the strength to overcome whatever may come our way this year. The willpower to get up after being knocked down, the endurance and robustness that build up after experiencing any form of hardship.

I wish you a very happy and fulfilling 2021!

A photo of one of the local newspapers that reported my incident.

MY NEW YEAR RESOLUTIONS INSPIRED BY MOUNT. KINABALU

I have always wanted to climb a mountain. I have always wanted to walk alongside the clouds, and jump over the rainbow. I hold on to a belief that if a thought comes to your mind, it excites you, and it passes your first sanity check, then you should act upon it immediately. Otherwise, that idea would fade out and erode with time. I contacted a mountains climbing agency to help me bring my idea to life. Within 4 days, I booked a flight ticket to climb the Kinabalu Mountain, the highest peak in Malaysia. I arrived around midnight, got an uber drive from the airport and headed to a village near the mountain camp, where the climbing group will commence the trip.

In the morning, I put on my climbing gear and layers of clothes. It was sunny but cold. The feeling of the fresh and cold morning air filling my lungs got me singing:

“All those simple thoughts all those peaceful dreams
Share the space with a hard-worked day
But it’s the little things, not expectations
That make life worth living,
The sun is shining, shining down
Glory, Hallelujah
I’m alive
And I’m feeling, feeling fine……”

EAECDFCE-D2D5-4A3E-9454-095ADDD6DF6D

I arrived at the camp where the group was gathering to start the trip, and I was introduced to my guide and other group members. As we were ascending and chatting, my brain started sending me messages that it can’t manage to exhaust its energy on talking while processing the shock of this unfamiliar workout. The sceneries nonetheless, were priceless, and the peculiar fragrance of the mountain plants carried by the wind and clouds made me fall in a state of ecstasy and overcome my exhaustion.

One of my group members was a senior man around 60 years old. I remember first seeing him at the beginning of the trail before surpassing him and rushing forward. Few hours in, and my senior friend skips me with his small, slow, and steady steps, while I was hardly catching my breath off-trail.

We arrived at the basecamp around sunset to sleep and recharge before resuming the trip at 2am. The higher in altitude we ascended, the steeper the volcanic mountain got with its slippery ground, while we were hardly maneuvering the strong wind and darkness, aided by robes, head torches, and windbreakers.

On my way up near the summit, I stopped in a spot away from the group and switched off my torch. I remained motionless there for a while trying to decipher the words the wind was trying to convey. I looked up to the sky to see the mesmerizing baseball-sized stars. I stood there so quiet with a firm step. My mind was out of words, yet my soul was immersed in a full conversation with the universe, praising its creator. I felt so humbled by the magnificence of Mount. Kinabalu underneath me, and so small among the vast number of stars and galaxies above me.

We reached the summit near the dawn and watched the sunrise from an altitude of 4,096m above sea level, but my feeling of triumph was even higher than that altitude. I wrapped up my feeling of triumph and victory and started descending to the basecamp. After a few hours, the feeling of exhaustion started taking over. A strong rainstorm hit us that the trail turned into streams, and it became even harder to maintain my pace on the slippery ground. I can’t remember the number of times my brain reached the point of “that’s my limit, I can’t go a single step further”, but since giving-up wasn’t an option, I had to repeatedly lie to him with “let’s keep going for just another 5 minutes, after that, we’ll call for help”. I reached the finishing point of the trail, never called for help, and I myself couldn’t believe that I had successfully made it!!

My 2020 new year resolutions inspired by that trip:

  • To finish the things that I have already started: While celebrating small victories like reaching the summit of Mount. Kinabalu is important for the morale, the final victory of successfully completing and ending the trip was what truly matter.
  • To maintain my mental toughness and spiritual wellbeing: my physical preparation wouldn’t have let me succeed at finishing that trip, had my spirit and mind weren’t in complete support.
  • To enjoy and appreciate the blessings that every minute caries: The sceneries that I had repeatedly stopped for, the friends that I had made, and the spiritual moments that I was blessed to have, were far more memorable than summitting Kinabalu.
  • To Push forward towards my goals until I reach my limit: I thought I had reached my limit of exhaustion on the trail several times. Now I don’t even know if my “limit” does even exist.
  • To be humble and realize how insignificant I’m in relation to the magnificence of the vast universe that I exist in: “do not walk haughtily in the land, for you cannot (thus) rend the earth asunder, nor can you match the mountains in height.”- The Qur’an.

63457881-918E-4022-A89F-1702EE5D5D72_1_105_c01ACF237-AA2C-4814-BA7F-17967410C801_1_105_c0B2D670E-58C7-4114-ADDD-7526617210CC_1_105_c.jpeg62606e4a-b9cb-4045-988a-c3d5ab9a6341_1_105_c.jpeg2D2B6AEA-38E1-4C09-9D33-433A747748BF_1_105_c.jpeg

d42670c1-caab-4a45-bc94-6655532d8fa0_1_105_c.jpeg

A Morning Walk Across The Universe

One day I got up and went for a morning walk around my new house. Close to the house, there is an empty and small deserted area, quiet and clean and makes a perfect location for a refreshing walk. On the other side of that area, there is a street that stretches across the sand, it looks like an under-construction highway that was left undone. I decided to walk down that street and enjoy a sight without brick and mortar putting visual boundaries in my way. It was quiet, and I could hear the wind blowing relaxing melodies in my ears and whispering comforting words to my soul.

 

2F60543D-FDA7-4FB8-968A-4B0BCD2E9A08

 

While I was walking down that downhill street, I glimpsed a red object in the distance. The place was empty and was hard to reach, so I assumed it was impossible that the spooky red object was a real person. As I continued walking, it became clear that it was a person wearing a red t-shirt. I thought to myself as I was approaching him:

“poor man, what is he doing in such a place?! He seems so weak and vulnerable. He must be a loner or maybe a manual worker going somewhere he can’t afford to get a ride to.”

The man got closer, and I slowed down to look at his face and identify him as he was passing by. When he approached, I looked up to his face, and that man was me.

That moment made me realize how important it’s to see ourselves from the distance. Because all that we see is a reflection of our inner selves and an embodiment of our own thoughts. Despite our individual differences, we’re all small objects in a massive cosmic system that we should be united with, and feel humbled by.

I will hold that image with me every time I think that my hopes or dreams are too big to be realized. Or when I misconceive my worries and see them the center of my world.

Words

“See you not how God sets forth a parable! A goodly word as a goodly tree, whose root is firmly fixed, and its branches (reach) to the sky, giving its fruit at all times by the leave of its Lord, and God sets forth parables for mankind in order that they may remember. And the parable of an evil Word is that of an evil tree: It is torn up by the root from the surface of the earth: it has no stability.”

All of us go through varying episodes of different emotional states. Stressful in anticipation of a tight situation, joyful in a pleasant gathering, or disappointed when our high expectations hit the ground. Some of these common emotional conditions can be easily labeled and identified. Others, however, get us into perplexing conditions, that we become unable to express what is floating deep in our hearts. Everything that constitutes a human consciousness is simply made up of “words”. “Words” are therefore units of a predefined set of meanings, that were created as part of our cultural evolution, to help us “label” our human experiences and convey stories. There’s a proverb in the Arabic language, which says that for one to have a better understanding of something, she should know what that something is not, i.e, its opposites. To know the power of words, imagine living in an abstract wordless reality!

Every decision we make, every action we take, every endeavor we seek, is tirelessly produced by a chain of words (stories, arguments, conclusions) recalled from our memory. These words are us, our being as groups and individuals, they determine our composition as humans. The way to becoming a good individual starts from consuming good content and exposed to good words, much like goodly trees should be watered with clean water. It is intuitively straightforward to conclude therefore, that living in a world made up of goodly words (metaphorically goodly trees) is where prosperity and growth reside. In contrast, evil words will yield nothing but failure, sadness, and grief.

What Did My 29th Birthday Teach Me?

UNADJUSTEDNONRAW_thumb_2411.jpg

A year has flown by, just like the thought of flying from the gutter to the stars. A chapter of my life has ended, with its stories, joy, and sorrows. A full cycle of changes has finished, with its warmth and breeze, through wind and tears. And on this day, as I’m sipping on my favorite iced latte, I’m reflecting on the impact that this 12 months cycle has left behind. I have no doubt that throughout the past year, life had given me whatever experiences were most useful to the evolution of my consciousness. This evaluation has yielded a few lessons, that I’m briefly sharing in the following points.

  • Time Flies.
  • It’s all about the breadth and depth of the experiences that we go through in life.
  • Consumerism is a fatal disease that eats away our freedom and eagerness to “living”.
  • Finding a life partner is essential. Being in a relationship is overrated.
  • When you give up on your dreams, they’ll decay inside you and leave you to mediocrity.
  • You shall not be fearful or worry, God has got your back all the time.
  • If you ridicule the rules and take risks, life will show you its mysteries and reward you handsomely. If you play by the rules and snooze in your comfort zone, you’ll be tormented for eternity.
  • The right time will never come.
  • Happiness is a decision.
  • Money can’t buy happiness unless accumulating wealth is a goal by itself. Achieving goals is a form of happiness.
  • You grow what you focus on.
  • Life will talk to you, only if you listen.
  • You’re an open system, constantly influencing others by your experiences, and being influenced by theirs.
  • Thoughts are translated into actions. Actions lead to results. If you want good results, start with good thoughts.
  • Choose your battles wisely. Don’t expend your energy in unnecessary battles.
  • Every effort you make towards achieving your dreams shall be rewarded, regardless of the results.
  • The ultimate truth is nonexistent.
  • Rebirth is a recurring process. Life takes us through short cycles that end up with the rebirth of newer versions (better or worse) of ourselves.
  • Embracing minimalism is a safe harbor in a materialistic, growth-oriented society.
  • Every day is a new life.
  • Overemphasising on the “why”, could be depriving of the blessings of “simple living”.
  • Arrogance is the mother of all evil.
  • Life has so many different faces. If one isn’t working out for you, seek a different exposure to another one.
  • Always leave a good trace behind you.
  • Ask, and it shall be given to you.
  • Good coffee, good food, good conversations, wild adventures, giving out, laughing, and loving. Nothing more.

And today, as I’m turning 29 years old, and making my way to the 30s, I’m opening my arms wide to a new cycle of experiences. I’m ready for further expansion in my awareness and additional growth in my consciousness.

Peace and Love.

 

HOW TO GET GOOD AT JUST ABOUT ANYTHING?

At some point of our lives, we all feel the need for achieving something remarkable. But because we think that we lack the talent which is necessary to achieve our goals, we may back off and stop pursuing them.

In fact, research suggests that the majority of people believe that talent is overrated, and that deliberate practice can help anyone get really good at just about ANYTHING they want to achieve.

But let’s assume that we buy into that assumption, which is talent is really vastly overrated, and that with the right amount and the right kind of practice, we can excel at whatever we want . The important question is, how can we have the persistence and stamina to push ourselves to practice like that? Where does that drive come from? And how can we increase our determination?

Grit.

Grit is the key word.

What does this word mean?

Grit is defined as having the passion and perseverance for achieving long-term goals. Therefore, gritty people are those individuals who have the ability to cultivate their inner strength, and to keep going until they achieve their ultimate goals. Several people cross on my mind as I’m trying to think of a typical example of a gritty individual. From Keanu Reeves in theatre, to Bill Gates in business entrepreneurship. 

But what specifically are gritty people like? What’s the first thing they do when they wake up in the morning? What beliefs do they walk around with in their heads?

I read a research that used in-depth interviews with several high achievers — like successful businesspeople, athletes, musicians, and so on, to report what they all have in common. The research concluded that these high achievers have the following four traits in common: 

(1) Passion

They have extremely well-developed interests. Meaning that they cultivate something which grabs their attention initially, but when they wake up the next day and the next day and the next year, they’re still interested in this thing. 

So passion really does have to come first.

Honestly though, this word (passion) has always been a perplexing word to me. Like how am I supposed to find my passion? Is it that I should wake up one day and figure out that I have passion in piano or programming?? It sounds like passion is there, but I just have to dig it up!

In fact, that research suggests that finding passion requires actively putting some work in, and trying things, until one can find his/her passion. This means that finding your passion will require doing enough exploration early on, quitting enough things early on, until you can find something that you’re willing to stick with. 

(2) Practice

And this is the un-fun part for most people. In fact, to get better and better at the thing that you’ve become interested in and passionate about, you need practice. Particularly, deliberate practice.

Malcolm Gladwell’s book the “Outlier” is premised on something called the 10,000-hour rule. Sometimes it’s called the ten-year rule. It is so-called because the average number of hours of effortful practice was found to be around 10,000 hours, or 10 years. 

(3) Purpose

Connecting your work, or even your hobby to people who are not you. So in order to excel at what you’re passionate about, you need to make sure that it is beyond-the-self purpose. Even athletes, who you might say “well, they’re doing something kind of selfish, right? They’re trying to win the gold medal for themselves.” In fact, surveys found that most successful athletes, are constantly seeing how their success is connected to the other people around them. So when they want to win gold medals, they want to do so in order to make their families and teams proud and happy.

(4) Hope

No matter where you are in your journey, there are going to be obstacles and challenges on the road. You will feel defeated, and think that it’s not worth staying on this path. 

At his point, you should keep in mind that there’s always something you could do to come back from these defeats and knock outs. You should have hope, and make your comebacks stronger than your setbacks. And never lose your confidence in yourself and in what you’re aspiring to achieve. 

What is The Truth?

 

Summer of 2014. I was sitting in my office, hiding my head in my laptop screen and surrounded by loads of documents on my desktop. My thoughts were all over the place and and I was rushing to finish my endless to-do list, that included the same daily dull tasks; reply to that email, update this report, and check that document.

I received a strange message on my “Facebook” account from Mr. Matsuno, one of my top managers in our branch office in Japan, that reads:

“I have been searching for the truth.

It is a journey to find the truth.

Where I wonder if there is truth?”

Reading his bizarre message made all my messy thoughts and ideas abate. I frowned up, straightened my back, and moved my head closer to the screen so I can make sure that I was actually reading the name, and the message correctly. Mr. Matsuno was an orthodox person who didn’t drink or smoke at all, so I was assumingthat he is being sensible and was waiting for a rational response to his valid message?!

I didn’t know what should I reply with! Should I send him a message to preach him on truth? But then, what is the “Truth” that he was searching for? or rather do I even know what that “truth” really is?

As soon as I started to ponder about my response, my mind was gradually blunging into deep and scattered philosophical explanations and ideas. The irony is that while just few moments prior to receiving his message, I was writing a long email to my co-worker about a production technicality, and now I was thinking about the meaning of life and the truth in the world?!

Mr. Matsuno, was one of the nicest people that I have ever known in my life. He was a passionate artist, a futile source of creativity, and a true embodiment of a humble and brave samurai character.

Several days had passed before I realized that the message of Mr. Matsuno was not a hollow and pointless one, it was rather hiding a lot behind it; probably days of interior monologue, reflection, and sleepless nights.

I figured that out when I received the news of Mr. Matsuno’s death few moths later. It happened while he was leaving his office in Tokyo going back to his house and beautiful family, when his motorcycle crashed into a broken car that was stopping on the side of the road, throwing his body meters in the air and crashing it over the wet asphalt of the street. And at an instant, his body that was always full of love and life, had abated.

His death has left me thinking that maybe on that day, the ultimate truth that Mr. Matsuno had been searching for, has finally revealed itself to him. He can surely now see it, feel it, and understand it.

But alas, Mr. Matsuno cannot send me any more messages now. And I wonder, if I could ever find a rational response to his message; and if I can learn what Truth is.

 

The following photo was posted by Mr. Matsuno on his Instagram account few months prior to his death. The caption he wrote on the photo is: “Sky in the Dream”.

FullSizeRender.jpg

The Beauty of Disorder

ibn-firnas

Mundane life is the source of all evil, and the roots of sadness and fear. In madness, pursuing peculiar goals, and hunting the mirage on the horizon, lies the precious secrets of life. It’s where the renaissance of art, and the salvation from the boundaries of mortality and sin begin. This bizarre philosophy however, means locking up the soul in an endless loop of torment, and being vulnerable to disappointment and insecurity.

When Abbas bin Firnas climbed a tower in Andalusia (Southernmost region of Spain), driven by his utter madness and passion to fly like birds, he veered away from the normality that dictates that humans should move about on two legs, or hub on those that walked on four legs equipped with a saddle or connected to a carriage. He was climbing the tower amid a large crowd of people murmuring, giggling and pointing at him. He was ascending burdened by two large wooden wings stitched up with feather, and a heavy inner voice that was shouting: “Stop! go back to your house, Now!””You’re making yourself look like a fool!”. “Do you feel this beautiful morning breeze? look at this splendid view of the city! Do you really want to sacrifice all this comfort for this insane idea!”.

Abbas never listened and never stopped. Abbas fell down, and we flew up after him, just like birds, in the way he envisaged thousands of years back.

We live in an era of mass-production, recycled ideas, and manufactured emotions. We herd after the “real” things all our life. Then at some point, we get struck by a totally unexpected event that leaves us in a crisis of faith, melancholy and anger. These events could be too small, like not waking up to our dream-job interview in the morning (because we were too exhausted visualising scenarios of that interview all night), or too big like the loss of a close friend. We then realise that we’d been sleepwalking all our life to catch the precious carrot, while failing miserably to see the stick. We realise alas too late, that we were unable to see beyond our tunnel vision, and to venture beyond our fears.

A cancerous and fatal social disease called “consumerism” is what keeps the wheel of “reality” spinning. We consume visual materials day and night, on Youtube, Netflix, or Tv stations, to learn how perfect and “normal” people lead their lives. How they dress-up and show-up, how they get paid and get laid. We’re being subconsciously programmed to conform to these illusory “rules” that constitute “reality”. The consequences of breaking away are dear. These consequences are words! but poisonous words that could cause a lot of damage to our self-image and self-esteem. These words will sound like: ” loser”, “unworthy” , “Stupid” , “Ugly”, “Not good enough”,”Not smart enough”. The source of these words is not our haters, it rather lives deep within our minds; it’s our inner bullies. These inner bullies go with us everywhere on a daily basis, they are ready to be triggered anytime we take the courage to break these rules, to free our minds. There’ll still be a probability however, of disturbing comments coming from those who are the best at conforming to the rules of “reality”, who perfectly follow what they were programmed to do. These comments will just come to add fuel to our raging inner fire of insecurity and fear.

I conclude with this quote by Philip Dick: “It is sometimes an appropriate response to reality, to go insane.”

Photo credit: https://historiafactory.wordpress.com/2016/07/07/abbas-ibn-firnas-810-887/