Similar to the Pirate's Code, your dog probably views the border around your property more as a guideline than a clear-cut boundary to stay within. Your dog's relaxed views regarding the property lines can be frustrating, but it generally is not deterred by severe scolding. If putting a fence up isn't an option, consider training your dog to recognize and respect the property bounds.
Dogs Know the Boundaries - Sort Of
You dog probably already has a good idea of what the boundaries are. Dogs are naturally territorial and this becomes obvious once another dog tries to enter the property. They usually don't appreciate that the boundaries are just as much for them as it is for keeping others out. Dogs are naturally curious and love to explore. Left to their own devices, they'll often hang around the yard, coming and going. It's difficult, however, for them to conceptualize the idea of staying within the strict limits of your property themselves.
Get Training Supplies
To begin boundary training with your dog, pick up some marker flags from a hardware store and some alluring snacks for your dog. You want treats that your dog will be crazy for, like pieces of meat. Consider getting a clicker as well, which will signal that he gets a reward. Alternatively, praise him when he obeys. Begin training indoors, where there are fewer distractions, for a couple of weeks before moving the training to the yard.
Begin Training Indoors
Inside, show your dog the flag. When he touches the flag with his nose, give him a treat and praise him (or click the clicker). This creates an association in his mind with touching the flag and getting a reward. After he gets used to that, gradually move the flag further and further away so that he will have to go over to the flag to touch it. When he does, immediately praise him and brandish the treat so that he will come back to you. This creates a strong correlation in the dog's mind between moving away from the flag toward you and receiving a reward.
Take It Outside
After the dog is accustomed to the flag training indoors, take him outside with a stretch-line leash. Place the flags around your yard boundary every 8 to 10 feet. Continue training as you were inside, gradually increasing the level of distraction and difficulty. Increase his freedom until you can train for short intervals off-leash. Stay aware of what's going on to make sure there are no major distractions nearby that will likely entice him to run off. If your dog does ever leave the boundary, don't punish him. Instead, praise and reward him for coming back so that he always associates positive experiences coming from within the property.
No 100% Guarantee
Remember that even with highly trained dogs, it's unlikely that you'll ever want to leave him in the yard by himself for extended periods of time unattended. It is advisable to keep your eye on him when in the fenceless yard. If you do plan on being more lax with him, make sure your dog has a collar with your name, address and phone number along with his rabies tag.