An additional point on this...

You can do as much as you want so long as what you write is consistent with the way things happen (unless you are doing what ifs). So, you can happily have hostorical characters doing things that are 'in character' so long as they don't, for example, prevent the assasination of Kennedy or shag queen Victoria...