← All lessons

Lesson 6 of 17Build a signal1 min read

What is a signal?

Turn something you notice into a number.

The idea

A signal is a measurement your program can use when making a decision.

Start by defining the measurement. Whether it helps predict a later price is a question for the testing stage.

A small example

For our project, use:

signal = latest price − average of the last three prices

With prices 10, 11, and 12, the average is 11. The signal is 12 − 11 = 1.

A positive value means above the average. A negative value means below it. Zero means equal.

Try it

Use the prices 12, 11, and 10. Calculate the average, then the signal.

Check your answer

The average is 11. The signal is −1, so the latest price is below the average.

You can now explain the number without claiming what happens next. In the next lesson, you will update that average as more prices arrive.