When did Hungary gain its independence?

Hungary declared independence on October 17, 1918 and officially formed its government on November 1 of that year.