What is speculative fiction, you ask? Speculative fiction is a group of genres based less on what they have in common with each other and more by what sets them apart from mainstream and romantic fiction. If speculative fiction mixes with romance or one of the other mainstream genres, it remains inherently speculative because of its very nature. Mainstream works are things that could, theoretically, happen or have happened. Speculative works are not.
Historical fiction is not speculative. Even though so-and-so did not actually ride to a certain town on a particular night, it is still a mainstream genre because so-and-so realistically could have done. The fact that that person did not do that in real life is what makes it historical fiction instead of researched history. Historical fantasy is speculative because some force exists in the story that does not exist in the real world. For example, a researched book about Shakespeare is historical non-fiction. A novel about Shakespeare writing his plays (think Shakespeare in Love or The Shakespeare Stealer) is historical fiction. A book about Shakespeare making a deal with a supernatural being to help him create his plays (think those two Sandman issues where Shakespeare shows up) is historical fantasy, and is, therefore, speculative because supernatural beings, no matter what your religious beliefs, do not simply tramp about every day making deals with authors, nor did they ever.
Speculative fiction is also known for being the umbrella for most of the works for which fanfiction is actually published professionally. This ranges from Doctor Who episode writing contests to Star Wars spinoffs, from the many Star Trek novels to fiction written in the worlds of MMORPGs like EverQuest and Forgotten Realms. Please remember that there are also speculative fiction fandoms that do not widely publish fanfiction professionally, such as Harry Potter. Although parts of this guide may be useful to those of you writing such fiction, large sections of it, such as those dealing with worldbuilding, are aimed at original fiction authors.
Also, while some genres are inherently speculative fiction, some fit into it sometimes but not others. Romance frequently crosses over with speculative genres, and horror can include the types of creatures that would make it speculative or it can be written as psychological horror, with no monsters at all, rendering it more mainstream than speculative. There are also a lot of speculative fiction stories that are also suspense, thriller, action, adventure, or mystery stories, and there are even some crossovers with Westerns, even though, like romance, all of those genres are inherently mainstream, not speculative, fiction.
It’s not really as complicated as it seems, though. Basically, if you use magic of any type, aliens, fantasy or mythological creatures, ghosts, monsters that are not real, space travel beyond what is currently possible, advanced laser weapons, any type of teleporting or beaming, time travel devices, or gods (or demons or angels or spirits) interfering in the lives of people, you are writing speculative fiction.