The 'holy ghost' component of the 'holy trinity' came about as the result of a complete misinterpretation of the word 'spirit' which comes from the latin 'spiritus'.
Spiritus means 'breath' or 'wind' or just 'moving air'. In latin versions of the Bible it replaced the Greek word 'pneuma' and the Hebrew 'ruah/ruach'. All of these words mean essentially the same thing.
If you read your Bible you will see that the Christian God bestows gifts: such as Samson's strength, Adam's life etc, upon people via the holy 'spirit'. He literally 'breathes' upon them.
Now if you read the Old Testament you will come across the Hebrew word 'sheol' which simply means 'grave' - the writers of the OT state, quite categorically, that when you die that is it: end of story.
NB All of the earliest Christians considered themselves to be JEWS - not followers of a completely new religion (read your Bible).
The proponents of the Christ Myth could not, however, 'sell' this concept to the pagans who indulged in ancestor worship and necromancy (consulting the wisdom of the dead): pagans believed that the essence of a person survived death.
So the proponents of the new solar deity: Jesus Christ, simply incorporated pagan belief into their new doctrine and created the 'holy ghost' - by deliberately misinterpreting the scriptures - in much the same way as they built churches in places that were already considered 'holy' by the pagan population.