Theory:

It can be observed how the character of the poem is addressed as the speaker. "The speaker, in a work of literature, is the person who is imagined to be saying the written words, or the character who speaks a monologue (a long speech)".** Speaker also goes by the name 'persona'.

Coming back to the poem "The Shed", it is never revealed how old the speaker is. However, several instances from the poem suggest that the speaker is a young boy. The fears mentioned in the poem and the manner in which they are described resemble that of a child. The idea that a dusty, deserted, and cobweb-filled building be haunted and scary is a part of a child's imagination. Also, the image of a possible ghost jumping out of its hiding place and attacking the speaker may seem highly childlike. The poem, hence, reveals the wild imagination and thought process of a young child. Since the poet is a male, it is safe to assume that the speaker is also a male.

An in-depth understanding of the poem and the character may reveal more about the speaker. The boy faces a huge psychological trial: he desires to venture out into the shed but is afraid of the unknown. Though he tries to tell himself that his fears are groundless, he is unable to beat them.

However, the weakening determination of the boy is still a kind of determination. Throughout the poem, the boy holds onto his wish to explore the shed. He is both convincing himself to visit the shed and at the same time justifying why he is unable to do so. The final stanza of the poem, where the boy is seen explaining his disregard for the fears, is crucial in understanding the mindset of the child. The child is trying to make the world see that he is not scared; as typical of a child, the boy wants the world to think that he is braver than he actually is.

Apart from the speaker, we also learn about another character: the boy's brother. The character is introduced to the readers in the third stanza, and he is again mentioned in the fourth. The boy describes how the brother had told him about the ghost hiding under the floorboards of the shed. He had also scared the boy by telling him the ghost would jump out and 'chop' his head off if he ever dares to step into the shed. And it is later revealed in the next stanza that the brother keeps the shed as his den. Hence, he had intentionally dropped the fear into the speaker's head so that he could keep the latter away from the shed.

Though it is not mentioned whether the brother is older or younger to the speaker, it is clear from the lines that he is an older brother. It is very likely that the brother is in his early adolescence while the speaker is in his early-middle childhood.
Reference:
**https://dictionary.cambridge.org/dictionary/english/speaker