Wednesday , October 30 2024
Home / Lars P. Syll / Financial economics — science or chance?

Financial economics — science or chance?

Summary:
Financial economics — science or chance? Those of us who occasionally follow stock markets worldwide are usually well aware of the fact that ‘winners’ in these markets are largely the result of the harvest of chance. Occasionally, however, one hears so-called day traders express the view that it surely cannot be a question of pure luck that some stock traders consistently make winning transactions in the market. To test the sustainability of these opinions, one can amuse oneself by using a little Python script yours truly has made to simulate a chance scenario throwing a die and calculating the probability that at least one person out of 100 gets heads at least 9 times when each person flips a coin 10 times: import mathdef binomial_coefficient(n,

Topics:
Lars Pålsson Syll considers the following as important:

This could be interesting, too:

Editor writes The 2024 economic laureates and more Nobel nonsense

Lars Pålsson Syll writes Central bank independence — a convenient illusion

Lars Pålsson Syll writes Finanspolitiska myter II

Lars Pålsson Syll writes Finanspolitiska myter

Financial economics — science or chance?

Investing: Luck or SkillThose of us who occasionally follow stock markets worldwide are usually well aware of the fact that ‘winners’ in these markets are largely the result of the harvest of chance. Occasionally, however, one hears so-called day traders express the view that it surely cannot be a question of pure luck that some stock traders consistently make winning transactions in the market.

To test the sustainability of these opinions, one can amuse oneself by using a little Python script yours truly has made to simulate a chance scenario throwing a die and calculating the probability that at least one person out of 100 gets heads at least 9 times when each person flips a coin 10 times:

import math
def binomial_coefficient(n, k):
return math.factorial(n) // (math.factorial(k) * math.factorial(n k))
def probability_single_person(n, k):
p = 0.5 # probability of heads for a fair coin
probability = 0
for i in range(k, n + 1):
probability += binomial_coefficient(n, i) *
(p ** i) * ((1 p) ** (n i))
return probability
def probability_at_least_one_person(num_people,
flips_per_person, min_heads):
single_prob = probability_single_person(flips_per_person,
min_heads)
return 1 (1 single_prob) ** num_people
# Parameters
num_people = 100 # number of people
flips_per_person = 10 # number of coin flips per person
min_heads = 9 # minimum number of heads for success
# Calculate the probability
probability = probability_at_least_one_person(num_people,
flips_per_person, min_heads)
print(f”The probability that at least one person out of
{num_people} gets heads at least {min_heads} times is approximately {probability:.4f} or {probability * 100:.2f}%”)

Lars Pålsson Syll
Professor at Malmö University. Primary research interest - the philosophy, history and methodology of economics.

Leave a Reply

Your email address will not be published. Required fields are marked *