Owning a sword on your own property (home and office included, but not shared apartment space without Landlord's prior approval) is protected by the second amendment in the states. Your landlord may have a problem, though. Ask them first.
Carrying a sword, however, is not nearly as open. Here's the
New York Law, state law is up top and NYC law is below. Note: when they say "possession", they mean carrying in a public place.
Quote:
D. The provisions of subdivisions b and c of this sections shall not apply to (1) persons in the military service on the state of New York when duly authorized to carry or display knives pursuant to regulations issued by the chief of stall to the governor; (2) police officers and peace officers as defined in the criminal procedure law; (3) participants in special events when authorized by the police commissioner (4) persons on the military or other service of the United States, in pursuit of official duty authorized by federal law; or (5) any person displaying or in possession of a knife otherwise in violation of this section when such a knife (a) is being used for or transported immediately to or from a place where it is used for hunting, fishing, camping, hiking, picnicking or any employment, trade or occupation customarily requiring the use of such knife; or (b) is displayed or carried by a member of a theatrical group, drill team, military or para military unit or veterans organization, to from or during a meeting, parade or other performance or practice for such event, which customarily requires the carrying of suck knife or (c) is being transported directly to or from a place of purchase in such a manner as not to allow easy access to such knife while it is transported; or (d) is displayed or carried by a duly enrolled member of the Boy or Girl scouts of America or similar organization or society and such display or possession is necessary to participate in the activities of such organization or society.
Don't carry a sword for fun. Carry it directly to your class/show/whatever and directly back. Stopping for gas is considered traveling. Stopping for dinner is putting yourself at risk of overzealous cops.
Also, I'm not sure about the subway system. If they have a sign saying "no guns", they will have a problem with someone carrying a katana onboard.