Mainly focusing on Elliott's Wave Theory to help determining the market trend and golden ratios to determine price.
Elliott Wave Theory is a technical analysis used to describe price movements in the financial market. The stock price movements and consumer behaviors can be identified as waves according to Elliot.

As shown in the above graph, a whole big wave consists of 8 small waves. There are two types of waves, one called Impulse (Motive) wave and the other called Corrective wave. In the above graph, wave 1,3 and 5 are Impulse waves, and wave 2 and 4 are Corrective waves. However we can see that the 5-wave trends are then corrected and reversed by 3-wave countertrends: A-B-C.
The Impulse wave is not always in the upward direction and the Corrective wave is not always in the downward direction. That's because the definition of Impulse wave is to make a net movement in the same direction as the trend of the next-largest degree while the definition of Corrective wave is to correct the direction of the movement. For example, in the bear market shown in the following graph,

wave 1,3, and 5 are still Impulse waves, but they are moving downwards.
Sometimes a big wave can consist of a whole 5-3 wave. It will be shown as follows:

Here, Wave (1) consists of Wave (i), (ii), (iii), (iv), (v); Wave (2) consits of Wave (a), (b) and (c);... These will usually happen when you look at different time scales.
The calculation of prices usually involves Fibonacci Sequence. * %Wave 2 = (%Wave 1) $^{0.5}$ or (%Wave 1) $^{0.618}$. Here is the Python code below which helps you calculate:
# Bull market, po4 and po5 are the most common ones (as stated above)
def wave_positive(x,y):
po1 = p1 * ((1-pe)**0.125)
po2 = p1 * ((1-pe)**0.236)
po3 = p1 * ((1-pe)**0.382)
po4 = p1 * ((1-pe)**0.5)
po5 = p1 * ((1-pe)**0.618)
po6 = p1 * ((1-pe)**0.764)
po7 = p1 * ((1-pe)**0.875)
po8 = p1 * ((1-pe)**1)
return po1, po2, po3, po4, po5, po6, po7, po8
# Enter the highest value in Wave 1
x = float(input("Enter the final value" + " "))
# Enter the lowest value in Wave 1
y = float(input("Enter the initial value" + " "))
# Calculate the increasing rate of prices
pe = (x-y)/y
# Enter the value to start calculating (In this case is the highest value of Wave 1)
p1 = float(input("Enter the value you want to start" + " "))
result4 = wave_positive(x,y)
# pe is indeed greater than 0 as it is in bull market and the final value is the highest value of Wave 1
if pe > 0 and x == p1:
print(str(result4))
# Bull market, poc11, poc12 and poc13 are the most common prices, while other prices are convenient for calculating prices compared Wavee 5 to Wave 1
def wave_poscor(x,y):
poc1 = p1 * ((1+pe)**0.236)
poc2 = p1 * ((1+pe)**0.382)
poc3 = p1 * ((1+pe)**0.5)
poc4 = p1 * ((1+pe)**0.618)
poc5 = p1 * ((1+pe)**0.764)
poc6 = p1 * ((1+pe)**0.875)
poc7 = p1 * (1+pe)
poc8 = p1 * ((1+pe)**1.236)
poc9 = p1 * ((1+pe)**1.382)
poc10 = p1 * ((1+pe)**1.5)
poc11 = p1 * ((1+pe)**1.618)
poc12 = p1 * ((1+pe)**2)
poc13 = p1 * ((1+pe)**2.618)
return poc1, poc2, poc3, poc4, poc5, poc6, poc7, poc8, poc9, poc10, poc11, poc12, poc13
x = float(input("Enter the final value" + " "))
y = float(input("Enter the initial value" + " "))
# rate of change = (final value - initial value)/initial value
pe = (x-y)/y
# Enter the value to start calculating (In this case should be the lowest value in Wave 2)
p1 = float(input("Enter the value you want to start" + " "))
result2 = wave_poscor(x, y)
# pe is indeed greater than 0 as it is in bull market and the final value is not the hightest value of Wave 1
if pe > 0 and x != p1:
print(str(result2))
# Bull market, po3 is the most common ones (as stated above)
def wave_positive(x,y):
po1 = p1 * ((1-pe)**0.125)
po2 = p1 * ((1-pe)**0.236)
po3 = p1 * ((1-pe)**0.382)
po4 = p1 * ((1-pe)**0.5)
po5 = p1 * ((1-pe)**0.618)
po6 = p1 * ((1-pe)**0.764)
po7 = p1 * ((1-pe)**0.875)
po8 = p1 * ((1-pe)**1)
return po1, po2, po3, po4, po5, po6, po7, po8
# Enter the highest value in Wave 3
x = float(input("Enter the final value" + " "))
# Enter the lowest value in Wave 3
y = float(input("Enter the initial value" + " "))
# Calculate the increasing rate of prices
pe = (x-y)/y
# Enter the value to start calculating (In this case is the highest value of Wave 3)
p1 = float(input("Enter the value you want to start" + " "))
result4 = wave_positive(x,y)
# pe is indeed greater than 0 as it is in bull market and the final value is the highest value of Wave 3
if pe > 0 and x == p1:
print(str(result4))
# Bull market, porc4, poc5 and poc7 are the most common prices.
def wave_poscor(x,y):
poc1 = p1 * ((1+pe)**0.236)
poc2 = p1 * ((1+pe)**0.382)
poc3 = p1 * ((1+pe)**0.5)
poc4 = p1 * ((1+pe)**0.618)
poc5 = p1 * ((1+pe)**0.764)
poc6 = p1 * ((1+pe)**0.875)
poc7 = p1 * (1+pe)
poc8 = p1 * ((1+pe)**1.236)
poc9 = p1 * ((1+pe)**1.382)
poc10 = p1 * ((1+pe)**1.5)
poc11 = p1 * ((1+pe)**1.618)
poc12 = p1 * ((1+pe)**2)
poc13 = p1 * ((1+pe)**2.618)
return poc1, poc2, poc3, poc4, poc5, poc6, poc7, poc8, poc9, poc10, poc11, poc12, poc13
x = float(input("Enter the final value" + " "))
y = float(input("Enter the initial value" + " "))
# rate of change = (final value - initial value)/initial value
pe = (x-y)/y
# Enter the value to start calculating (In this case should be the lowest value in Wave 4)
p1 = float(input("Enter the value you want to start" + " "))
result2 = wave_poscor(x, y)
# pe is indeed greater than 0 as it is in bull market and the final value is not the hightest value of Wave 1
if pe > 0 and x != p1:
print(str(result2))
# Bull market, po4 and po5 are the most common ones (as stated above)
def wave_positive(x,y):
po1 = p1 * ((1-pe)**0.125)
po2 = p1 * ((1-pe)**0.236)
po3 = p1 * ((1-pe)**0.382)
po4 = p1 * ((1-pe)**0.5)
po5 = p1 * ((1-pe)**0.618)
po6 = p1 * ((1-pe)**0.764)
po7 = p1 * ((1-pe)**0.875)
po8 = p1 * ((1-pe)**1)
return po1, po2, po3, po4, po5, po6, po7, po8
# Enter the highest value in Wave 5
x = float(input("Enter the final value" + " "))
# Enter the lowest value in Wave 5
y = float(input("Enter the initial value" + " "))
# Calculate the increasing rate of prices
pe = (x-y)/y
# Enter the value to start calculating (In this case is the highest value of Wave 5)
p1 = float(input("Enter the value you want to start" + " "))
result4 = wave_positive(x,y)
# pe is indeed greater than 0 as it is in bull market and the final value is the highest value of Wave 5
if pe > 0 and x == p1:
print(str(result4))
# Bull market, so Wave A is corrective, and ne3, ne4 and ne5 are the most common ones (as stated above)
def wave_negative(x,y):
ne1 = p1 * ((1+abs(pe))**0.125)
ne2 = p1 * ((1+abs(pe))**0.236)
ne3 = p1 * ((1+abs(pe))**0.382)
ne4 = p1 * ((1+abs(pe))**0.5)
ne5 = p1 * ((1+abs(pe))**0.618)
ne6 = p1 * ((1+abs(pe))**0.764)
ne7 = p1 * ((1+abs(pe))**0.875)
ne8 = p1 * ((1+abs(pe))**1)
return ne1, ne2, ne3, ne4, ne5, ne6, ne7, ne8
# Enter the lowest value in Wave A
x = float(input("Enter the final value" + " "))
# Enter the highest value in Wave A
y = float(input("Enter the initial value" + " "))
# Calculate the increasing rate of prices
pe = (x-y)/y
# Enter the value to start calculating (In this case is the lowest value of Wave A)
p1 = float(input("Enter the value you want to start" + " "))
result3 = wave_negative(x,y)
# pe is less than 0 as it is in bull market and the final value is the lowest value of Wave A
if pe < 0 and x == p1:
print(str(result3))
def wave_negcor(x,y):
nec1 = p1 * ((1-abs(pe))**0.125)
nec2 = p1 * ((1-abs(pe))**0.236)
nec3 = p1 * ((1-abs(pe))**0.382)
nec4 = p1 * ((1-abs(pe))**0.5)
nec5 = p1 * ((1-abs(pe))**0.618)
nec6 = p1 * ((1-abs(pe))**0.764)
nec7 = p1 * ((1-abs(pe))**0.875)
nec8 = p1 * (1-abs(pe))
nec9 = p1 * ((1-abs(pe))**1.236)
nec10 = p1 * ((1-abs(pe))**1.382)
nec11 = p1 * ((1-abs(pe))**1.5)
nec12 = p1 * ((1-abs(pe))**1.618)
return nec1, nec2, nec3, nec4, nec5, nec6, nec7, nec8, nec9, nec10, nec11, nec12
# Enter the lowest price of Wave A
x = float(input("Enter the final value" + " "))
# Enter the highest price of Wave A
y = float(input("Enter the initial value" + " "))
# rate of change = (final value - initial value)/initial value
pe = (x-y)/y
# Enter the highest value of Wave C
p1 = float(input("Enter the value you want to start" + " "))
result1 = wave_negcor(x, y)
# pe is less than 0 in bull market and the final value is the highest value of Wave B
if pe < 0 and x != p1:
print(str(result1))
Note here all the code is provided in bull market, full code including bear market will be attached in the file.




How do we determine the price of correction or price of impulse?
$ claude mcp add Stock-market \
-- python -m otcore.mcp_server <graph>