wiktionary
ref
Formed 1759, from valediction(“speech made when leaving”).
etymonline
ref
valedictorian (n.)
"student who pronounces the oration at commencement exercises of his or her class," 1832, American English, from valedictory + -ian. As an adjective from 1834.