Stock Operator

This book was recommended by last employer CEO. It is based on the life of a stock trader Jesse Livermore from the early XX century.

One of the first shocking things in the book is in the introduction. This is a book about speculation.

That tells you a lot what was the market before, and what is today.

He made millions trading, lost them, recover, and at the end commit suicide. Still the book has good points for a trader point of view. I will never be a trader, because long term, very few, win.

I like his beginning in the trading world. He was very good at the bucket shops and he was forbidden to trade once he beat the house each time. Like in a casino.

One thing I realised about his trading in bucket shops is, his actions didn’t have impact in the market so it was a very reliable technique. But when he moved to the real market, he struggled. It is like the Schrodinger’s cat, until you dont trade, dont know if the stock is going to go up or down. And the other one, is the execution time. Low latency in those times were via telegraph lines, and they were critical. It is seems Western Union started in that business. If you have to buy many shares, very likely you will not buy all of them at the same price (it will go up, so it will be more expensive for you) and it will take some time. So for that period of execution, you are a bit at the mercy of the “market”.

There are many references to other early grate traders, scandals, crisis, etc. It was interesting how the American Civil War was financed by selling bonds to the European markets and then how during the WWI, all Europe gold came back to USA to finance all the arms needed for the war.

War is business. And then, they tell you is patriotic.

Another curious thing, is the trade of cane sugar. There was so much sugar that it was needed a market for it so it wouldn’t crash… then it was invented our “sugary breakfasts” and the chocolate bars!

At the end, I noticed that the whole trading experience could be repeated in our days without much difference. Maybe without the excess like the Wolf of Wall Stree movie/book.


Trying to make a small change to a python program in my job, I came across something I didnt know in python and only after reading this article (a couple of times) I managed to understand (ask me again in 3 weeks 🙂 The best definition I could find was actually from other blog reference and actually I think it was more clear to me.

“A decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.”

1 – Function returning a function:

In [7]: def greet(name): 
   ...:     return f"Hello, {name}!" 
   ...: def simon(func): 
   ...:     return func("Simon") 

In [8]: simon(greet)                                                                                                          
Out[8]: 'Hello, Simon!'

simon is a function that has a function as argument, and calls that function with the argument “Simon”. So the function greet is receiving the argument “Simon” and returns a string with that name.

2 – Functions inside other functions:

In [9]: def respect(maybe): 
   ...:     def congrats(): 
   ...:         return "Congrats, bro!" 
   ...:     def insult(): 
   ...:         return "You're silly!" 
   ...:     if maybe == "yes": 
   ...:         return congrats 
   ...:     else: 
   ...:         return insult 

In [10]: respect("hola")()                                                                                                    
Out[10]: "You're silly!"

In this case, to execute the returned function you need to use “()” at the end (because respect(“hola”) it is a function!): respect(“hola”)()

Keep in mind you return the function “congrats” and it is not executed. If you return “congrats()” then yes, you get the result of executing congrats.

3 – A function that takes another function and defines a function:

In [1]: def startstop(func): 
   ...:     def wrapper(): 
   ...:         print("Starting...") 
   ...:         func() 
   ...:         print("Finished!") 
   ...:     return wrapper 
   ...: def roll(): 
   ...:     print("Rolling on the floor laughing XD") 
   ...: roll = startstop(roll)                                                                                                

In [2]: roll()                                                                                                                
Rolling on the floor laughing XD

In [3]:        

This case is the same as before, need to use “()” to “execute” roll because it is a function.

4 – With decorator:

In [3]: def startstop(func): 
   ...:     def wrapper(): 
   ...:         print("Starting...") 
   ...:         func() 
   ...:         print("Finished!") 
   ...:     return wrapper 
   ...: @startstop 
   ...: def roll(): 
   ...:     print("Rolling on the floor laughing XD") 

In [4]: roll()                                                                                                                
Rolling on the floor laughing XD

In [5]:          

So adding the decorator we avoid writing a line with nested functions. That in a more advanced case, it would make the code easier to read.

You can nest decorators and add arguments too.


I love bread and I watch a lot of videos about cooking that come up randomly. And this one is something that caught my attention. This looks like it is a typical fried bread or pancake in central Asia. The video shows the Turkish version so I decided to give it a go:


  • 2 glass of plain flour
  • 3/4 glass of water
  • 1 tsp of salt
  • 1/2 tsp of sugar
  • 75g butter melted
  • 1/4 glass vegetable oil


  • Mix salt and sugar in water. Add the water the flour and mix all well together.
  • Knead for 5 minutes. Let it rest and then knead again for a couple of minutes. Rest again for 15 minutes.
  • Knock the dough and form a rounded ball. Cut in four pieces and then each piece in two. In total you will have eight pieces. You can make it bigger though.
  • Round each dough ball and let is rest in a floured surface.
  • Mix the butter and vegetable oil.
  • This is the difficult part and is better to watch the video a couple of times. Be sure you have your surface properly floured (I am not used to) for the next step.
  • Using a rolling pin, try to make the thinnest layer you can, if rectangle shape, the better. Then spread some butter mix on it. Fold one third from the right side, spread some oil, fold the other third on top of the oiled one. Oil again. You should have a rectangle. Fold a third from the bottom, oil and fold finally from the top. You should have like a handkerchief .
  • In a medium/hot pan, with just a bit of oil, fry each unit until golden/crispy each side. If you are good, it will bubble up! (just a bit in my case)

It took me a bit and I struggled with rolling pin as I am not used to this kind of dough. But the result was good, very crispy! (I need much practice to reach the level of the video)


It is funny but after reading that eating beef doesnt help the planet, last week I decided to cook brisket and bought a 5kg piece…. I am a bit a hypocrite right now. In general I dont eat much meat but it is done.

So this desire came from one visit to a BBQ restaurant some time ago. And I wanted to try at home with my oven. So I found this recipe that looked good to follow.


  • 2.5kg brisket
  • salt, pepper, paprika, brown sugar, garlic, spices for the rub
  • 2 onions and 2 potatoes
  • 1 can of beer (or 200ml wine)
  • 1 litre of beef stock
  • foil


  • Combine all spices. Be sure the brisket is not too wet, so you can spread the spices properly in the whole piece.
  • Let the meat rest (marinate). Put it in foil in the fridge.
  • In a big hot pan with a bit of oil, seal the brisket. Then fry the onions at medium heat.
  • Add the beer to the onios until soft.
  • Move the onions to a oven try, add the brisket and sliced potatoes.
  • Add the beef stock.
  • Cover in foil the tray and put in a pre-heat oven at 175C for 4.5-5h.
  • After long wait, take the tray from the oven and remove the foil.
  • Let the meat to rest for a bit

This was my result:

It wasnt like in the restaurant but actually it was like some beef stew I used to have as a kid. Good lunch for a long week…

Our Planet

This week finished a book from David Attenborough. It is impressive how much the population of the planet has increased since he was born (1937) until 2020. Based on the book is from 2.3 billion people to 7.8 billion. And how much the wildnerness has decreased in the same period (from 66% to 35%). Keeping mind we had two WW in XX century…

The first two parts are quite pessimistic with all the damage we have caused. But then he offers option for the present to save the future.

The main focus is recovering wildnerness in the world. We need to move to a more sustainable economy (it is not going to be pretty for the super rich and powerful countries) where growth can’t be the only measure (NZ has done something about it). We need to use less (the richest person is the one who has less needs said my grandmother), reproduce less (hello religions!!!). We need to use clean energy. This is a hard topic. Batteries and solar panels need to be more efficient, cleaner to fabricate and recycle. Most of the components have to be mined…. But yeah, the sun energy is a big deal. How much we can get from deserts?

For Nature itself, recover the oceans with policies to avoid over fishing and let recover the wildnerness. The book give the example of Cabo Pulmo and Palau as examples and the benefits of doing so. Better fishing, more sources of income. Win-Win.

Reduce the farmland footprint and let the forests recover their strength (with all the fauna included). This focus in meat consumption. I dont believe becoming vegan is the solution but eating meat every day is not needed. Our grand parents didnt eat meat everyday, that was a luxury. And not long ago, you had to pay the Church for eating meat (“la bula”) So I strongly believe in eating more green (but not manufactured stuff….). I dont see the point of cutting more trees to grow soy for producing meat-life products instead of raising cows. It seems 60% of farmland is dedicated to only beef, crazy. This is quite connected to the global populations too. Imagine if India were a beef-eating country….

Improve agriculture with regenerative farming. I believe in this, although I feel quite naive and romantic about this subject. It is a dream to have your terrain with several types of fruit trees producing good products every year, depending on the season, having your vegetables growing among them, and bees!. And not using any pesticide. Dream. I am pretty sure the yield wouldnt be very constant but this is built for balance. You have several crops… In a world with less people and not based in extreme-capitalism (surplus surplus!!!!) it would work (I hope)

The book says we are reaching our population peak but I dont believe, because religions dont want that, nationalism dont want that. But this is one of the last shift and I guess more difficult one. Changing/adapting ourselves.

If we allow it, life finds a way, like in they city near Chernobyl. It has been recovered by the forests!

At the end of the day, it is always the same solution. Balance. The virtue is in the middle (it seems Aristotle said that).

Timballo di Riso

Some years ago I went to this restaurant. We had a nice meal and I remember I tried something totally new: “Timballo di riso”. It was super tasty, it wasn’t a normal risotto (that still I haven’t master it…) and it wasn’t a pasta dish. So I only managed to take a picture of the ingredients, because I finished it too quick. Since then, I had it into my to-cook list but finally I decided to try after checking some videos. This was the source for my attempt.

Original Ingredients:

  • Arborio rice, saffron, Béchamel sauce (milk, nutmeg, salt, butter, whipping cream, flour type 00), Vegetal broth ( celery, carrots, onion, broccoli, zucchini), Fontina cheese, ham, Parmigiano Reggiano cheese, salt

My ingredients:

  • Glass of risoto rice.
  • 2 glasses of boiling water
  • 1 cube of stock
  • 100g of butter
  • pinch of saffron (or similar)
  • 2 bay leaves
  • bechamel / white sauce:
  • – 50g butter
  • – 1/2 glass of flour
  • – 2 glass of milk
  • – nutmeg, pepper and salt
  • 250g cure ham cut in small pieces.
  • 1 mozzarella ball
  • chopped parsley
  • grated Parmesan
  • breadcrumbs


  • In a big pan and medium heat, put the boiling water, stock cube, butter, saffron and bay leaves.
  • Once all mixed, add the rice. Let it cook at low heat until it gets dense. Stir from time to time to be sure it doesn’t stick.
  • Let the rice to cool down in a try.
  • Prepare the bechamel sauce. In a pan, melt the butter, add the flour. Once it is combined like a brown paste, start adding milk bit by bit. It should start to form a sauce. Add nutmeg, pepper and salt. Keep adding milk. At the end you should have a creamy tasty sauce.
  • Put the ham and shredded mozzarella with the bechamel. Add the parsley.
  • Add the rice to the bechamel mix. Combine everything. Add the mix into a ovenproof glass dish.
  • Top the dish with a layer of grated Parmesan and then another of breadcrumbs.
  • To the oven at 180C until golden on top (20 minutes)

Here we go!

To be honest, I don’t remember the taste so I can’t compare but it was taste. It is like a risoto without mushrooms but with cheesy bechamel!

So again, I liked it, I enjoyed cooking and had a good lunch for the work days! I don’t need much more (enjoy my job?)

This time is not different

I had this book in the pipeline. It is a bit technical but is interesting as it tries to provide data for several centuries about financial crisis. That is quite challenging not just because governments from middle age didn’t have much accountability but even nowadays the authors struggled getting hard number regarding domestic debt.

The book was written about the subprime crises in 2007-8 so that’s the main focus to proof that the event is not that different from other crisis. And it is remarkable how many crisis I have been through since 1980s without really noticing (but my parent sure they noticed…)

The book preface is super direct. The one common theme to most crisis is the excessive debt accumulation (governments, banks, corps, consumers). Even during a boom. So debt-fueled booms are not very healthy. And it was proved during the subprime that the financial markets dont correct themselves.

One of the most interesting points of the whole book is the evolution of default-prone countries (like France and Spain) to “stable” ones. This graduation process is long and hard, and not many pass the exam. As well, there are a lot figures about deb before 1929 crash, post WWII to put thing in perspective.

So it was interesting read mainly for the historic background and our psychological naivety during crisis times. At the end of the day, the economic is a cycle.


I have done some lentils and beans stew before haven’t tried chickpeas stew “cocido” before. And I fancied a good homemade cocido soup! So as I had my last piece of cure ham in the freezer, I went for it. This is a proper cocido, but I used the ingredients I had at hand and the result was very tasty. That’s what matters to me.


  • 1 piece of cure ham
  • 1 chicken breast sliced
  • 1 portion of chorizo
  • 1 potato
  • 1 cup of chickpeas cover on water from the day before
  • 1 onion
  • 1 carrot
  • 2 cloves of garlic
  • Salt, pepper
  • Paprika (pimenton!)
  • Some greens: I used chard
  • 2-3 handfuls of fideos


  • Get a big pan, put all ingredients apart from the greens and fideos
  • Fill the pan with boiling water. Put the pan at medium heat until start boiling. We want plenty of liquid for the soup!
  • Reduce heat till simmer. Stir from time to time for 1 hour of so.
  • Taste the liquid, it should have a strong flavour. If the potatoes, chickpeas and carrot are soft, we are nearly done.
  • Add the green and fideos. Stir for couple of minutes until the fideos are cooked. The greens will boil and keep a nice color.
  • Shred the ham so it releases all juices. Mix all together

All done, it is quite easy. And had a tasty lunch for the work week!


MM is one of the few people I read/folllow and his newsletter (and books) is one of the best in my opinion. And today I had a laugh about this week entry. I have never heard about the impact of CO2 with obesity but who knows. The funny part was the theory about the “world peace period” is mainly chased by the big corporations (McDonalds, Dell, etc) because war doesnt make profit for them. In one side, makes sense, USA-China are like a old married couple, standard war is not profitable. Just do it somewhere else.


I was surprised today reading this blog entry. Watching the video, it reminds me to techno, so it is good. And reading further his bio in wikipedia, I was really impressed with his persona, political/social effort and music. And somehow, I noticed there was a movie about him, I am pretty sure I have seen the ad somewhere but as usual, I normally ignore the movies.

I dont believe in those hall of fame things, but definitely I would put Tina, RATM and Fela.