Sunday , August 11 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:

Lars Pålsson Syll writes Deirdre McCloskey’s shallow and misleading rhetoric

Lars Pålsson Syll writes Paul Davidson (1930-2024) In Memoriam

Lars Pålsson Syll writes Dyrkan av prismekanismen

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 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,
single_prob = probability_single_person(flips_per_person,